说明:这个项目在apache php 环境下可以运行,但是放在linux nginx php环境下就会出现如下错误
问题1、我引入文件require_once('../../Public/nusoap-0.9.5/lib/nusoap.php');就会报无法引入nusoap.php的错误。
问题2、我使用require_once('Public/nusoap-0.9.5/lib/nusoap.php')引入文件后执行
require_once('Public/nusoap-0.9.5/lib/nusoap.php');
date_default_timezone_set('PRC');
//访问软件中的wsServer
$client = new nusoap_client("http://localhost:8080/test/services/qzl?wsdl");
$client->soap_defencoding = 'utf-8';
$client->decode_utf8 = false;
$client->xml_encoding = 'utf-8';
echo 'aaaaaaaaaaaaaaaaaaaaaaaaa';
//发送访问
$array = array("mp"=>1,"page"=>0,"name"=>"test",
"outTime1"=>"",
"outTime2"=>"");
$s = json_encode($array);
$result = $client->call("qzlOrderList",array("param"=>$s),"http://server.axis2.webservice.soa.com");
if (!$err=$client->getError()) {
echo " 程序返回 :",htmlentities($result,ENT_QUOTES);
}else{
echo " 错误 :",htmlentities($err,ENT_QUOTES);
} 就会报.HTTP Error: Couldn't open socket connection to server http://124.133.7.100:8080/jhgl/services/qzl?wsdl prior to connect(). This is often a problem looking up the host name可是单独运行http://localhost:8080/test/services/qzl?wsdl是可以执行的就叫TP高人指点,谢谢
最佳答案