我已经开发了一个使用肥皂请求的过程。它在装有 windows xp 的本地机器上运行良好。但是当我在 cpanel 服务器上上传时,它不会正确执行。我注意到它在这条线之后停止了处理$client->loadWSDL();
。$cleint 对象会创建得很好。如果有人知道它可能有什么问题。
提前致谢。
require_once('lib/nusoap.php');
require_once('config.php');
$params = "<CreateUsersRequest xmlns='http://www.abc-online.com/services/api/1.0/'>
<Credentials>
<EmailAddress>$emailaddress</EmailAddress>
<Password>$password</Password>
<CustomerID>$customerID</CustomerID>
</Credentials>
<Emails>
<string>$newEmail</string>
</Emails>
<AutoGeneratePassword>false</AutoGeneratePassword>
<Password>$newPassword</Password>
<SendLoginEmail>true</SendLoginEmail>
<PersonalComment>$comment</PersonalComment>
</CreateUsersRequest>";
//
$client = new soapclient($accountURL.'/services/api/1.0/soap_server.asmx?wsdl',array('encoding'=>'UTF-8'));
ini_set("soap.wsdl_cache_enabled", "0");
//$err = $client->getError();
//echo $err;
$client->setUseCurl(0);
$client->loadWSDL();
$userCreated = $client->call('CreateUsers',$params);
//find out if it worked
$userCreatedStatus = $userCreated['Success'];