我想从以下脚本返回一个值:
$wsdl_url = 'http://srv.test/erProject/services/services?wsdl';
$client = new SOAPClient($wsdl_url);
$params = array(
'IPADDR' => "111.12.13.14",
);
$return = $client->getUserInfo($params);
print_r($return);
echo $return->getUserInfo->expiredate;
print_r 工作并返回:
stdClass Object
(
[return] => stdClass Object
(
[UserCredit] => stdClass Object
(
[expiredate] => 23-02-2018
)
[resCode] => 1
)
)
但回声会返回:
PHP 注意:未定义的属性:stdClass::$UserCredit
PHP 注意:试图获取非对象的属性
提前致谢