close

轉自 https://stackoverflow.com/questions/45403975/php-soap-fault-could-not-connect-to-host

--

Finally, I got the solution,

I found the problem. The host I was trying to connect is redirecting to another domain name. For some reason, PHP 5.6 doesn't carry the location automatically. So i defined the same soap url in the location options.

Eg:

 

$params = array('location' => {soapurl});
$client = new SoapClient({soapurl},$params);

 

Thanks for your time. :)

--

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 dizzy03 的頭像
    dizzy03

    碎碎念

    dizzy03 發表在 痞客邦 留言(0) 人氣()