【发布时间】:2012-11-20 09:44:25
【问题描述】:
我也得到了宁静的 Web 服务响应。但我无法正确解析它
我的代码是这样的
include 'RestClient.class.php';
error_reporting(E_ALL);
// Client Profile
$url = "http://localhost/lgen/index.php/api/client";
$ex = RestClient::get($url,array('requestType' =>'viewClientProfile',
'username' => 'uname',
'pass' =>'pass'));
echo $response = $ex->getResponse();
$xml = simplexml_load_string($response);
当打印 $response 时,我在浏览器上获取数据,但在尝试解析它时没有获取任何类型的数据
【问题讨论】:
-
那么问题是什么?你有什么错误吗?
-
当打印 $response 时我在浏览器上获取数据,但在尝试解析它时没有得到任何类型的数据