我想从网络服务器(.net)获取数据并将其显示在我的网站上。
我的代码是:
$client = new soapclient('http://www.tsetmc.com/WebService/TsePublic.asmx?WSDL', true);
$client->useHTTPPersistentConnection();
$user = array('UserName' => 'etc');
$pass = array('Password' => 'etc');
$result = $client->call('Board', $user, $pass);
print_r( $result );
我收到此错误:
警告:isset中的非法偏移类型 或者空着 /home/mmdicir/public_html/lib/nusoap-0.7.3/lib/nusoap.php 在第7211行
数组([faultcode] => soap:服务器[faultstring] =>服务器 无法处理请求。 ---> 字符串引用未设置为 字符串的实例。参数名称: s [详细] => )
答案 0 :(得分:1)
$client = new soapclient('http://www.tsetmc.com/WebService/TsePublic.asmx?WSDL', true);
$client->useHTTPPersistentConnection();
$user = array('UserName' => 'etc', 'Password' => 'etc'); use like this its will work
//$pass = array('Password' => 'etc'); // wrong
$result = $client->call('Board', $user, $pass);
print_r( $result );