SoapClient结果“无法打开流:HTTP请求失败”

I'm trying to open a socket between my server and the other server, but it returns the following warring msg :

SoapClient::SoapClient() [soapclient.soapclient]: failed to open stream: HTTP request failed

my SoapClient should be connected using a specific IP, so I'm using the following code:

$aOpts = array('socket' => array('bindto' => 'my IP')); $rStreamContext = stream_context_create($aOpts);

$client = new SoapClient($this->_wsdl_test_url, array('stream_context'=>$rStreamContext));

the server keep giving me the same warning, failed to open stream: HTTP

1个回答



最后修复了,问题出在文件的加密上,我把它放在没有BOM的UTF8而不是UTF8 </ p>

</ div>

展开原文

原文

finally it was fixed, the problem was with the encryption of the file, I put it UTF8 without BOM instead of UTF8

立即提问