Solution of soap can not connect to host in

Knowledge map advanced must read: read how large-scale map data efficient storage and retrieval>>>

If you understand this article, you won’t have to explain it

After the client fills in the code normally, the following error will appear when simulating the call:

PHP SoapClient Could Not Connect to Host

Then blabal, the key point is that you can’t connect to the server and so on

There are many reasons for this, but before you do all kinds of grammatical error checking, you might as well try the following methods:

$client = new SoapClient(null, array(‘location’ => ” http://yourname/wsdl/s.php “,’uri’ => ” http://yourname.com “));

Change to:

$client = new SoapClient(null, array(‘location’ => ” http://1.1.1.1/wsdl/s.php “,’uri’ => ” http://yourname.com “));

Or you can bind the domain name. If you don’t want to bind it, you can use my native method to try, hehe:)

English Address: http://www.adcworks.com/2008/04/php-soapclient-could-not-connect-to-host/

Similar Posts: