soap 结果乱码解决方法

来源:互联网 发布:怎样绑定域名和空间 编辑:程序博客网 时间:2024/06/02 06:51

//http://fb.com/index.php/soap/webxml

public function webxml() {

header('Content-Type: text/html; charset=UTF-8');

$ws = "http://webservice.webxml.com.cn/WebServices/WeatherWS.asmx?wsdl";

$client = new SoapClient( $ws);//使用 wsdl方式

$cityCode = "991";

$result = $client->getWeather(array('theCityCode'=>$cityCode));

print_r($result);

}

0 0
原创粉丝点击