?> soap.php代码: class service { public function HelloWorld() { return "Hello"; } public function Add($a,$b) { return $a+$b; } } $server=new SoapServer("http://localhost/soap.wsdl",array('soap_version' => SOAP_1_2)); $server->setClass("service"); $server->handle(); ?> soap.wsdl代码:
一开赛的时候我是把soap.wsdl放在/var/www/html/wsdl文件夹里面的,原来的"http://localhost/soap.wsdl"为"http://localhost/wsdl/soap.wsdl" 可是不知道为什么报:Fatal error: Uncaught SoapFault exception: [HTTP] Not Found in的错误,路径是没错的呀?