你的位置:
问答吧
-> PHP
-> 问题详情
[SOAP] 使用PHP的SOAP时SOAP-ENV错误?
刚开始使用PHP自带的SOAP函数。在运行时服务器端(soap_server.php)出现如下的提示:
[Copy to clipboard] [ - ]CODE:
SOAP-ENV:ClientBad Request
我的代码如下:
[Copy to clipboard] [ - ]CODE:
//服务器端soap_server.php
include('agent_pass.php');
$server=new SoapServer(null,array('uri'=>'http://agent.kinca.net/'));
$server->addFunction("check_phone");
$server->handle($HTTP_RAW_POST_DATA);
?>
[Copy to clipboard] [ - ]CODE:
//客户端soap_client.php
header("content-type:text/html;charset=utf-8");
$client = new SoapClient(null, array('location'=>"http://127.0.0.1/soap_server.php",'uri'=>"http://agent.kinca.net/"));
$result=$client->