php7使用SSL協(xié)議訪問webservice出現(xiàn)問題
問題描述
錯誤為:SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://xxxxx/api?wsdl' : failed to load external entity "https://xxxxxxx/api?wsdl" in D:wwwcompare.php:22 Stack trace: #0 D:wwwcompare.php(22): SoapClient->SoapClient('https://xxx...', Array) #1 {main}
代碼如下:
$opts =array('http' => array('user_agent' => 'PHPSoapClient'),'ssl'=>array('verify_peer'=>false ,'verify_host'=>false,"verify_peer_name"=>false));
$url="https://xxxxxxx/api?wsdl";
$params= array('encoding' => 'UTF-8','soap_version'=>SOAP_1_1,'trace' => 1, "exceptions" => 1, "connection_timeout" => 180,'username' => 'xx', 'password' => '*****','stream_context' => stream_context_create($opts));
$client =new SoapClient($url,$params);
另外php.ini配置沒有問題,openssl和soap已經(jīng)打開
請問下各位大佬,怎么解決????
問題解答
回答1:系統(tǒng)環(huán)境為windows2012+apche2.4+PHP7.2
相關(guān)文章:
1. win10 python3.5 matplotlib使用報錯2. 數(shù)組排序,并把排序后的值存入到新數(shù)組中3. html5 - css3scale和rotate同時使用轉(zhuǎn)換成matrix寫法該如何轉(zhuǎn)換?4. MySQL的聯(lián)合查詢[union]有什么實(shí)際的用處5. php多任務(wù)倒計時求助6. PHP訂單派單系統(tǒng)7. python的正則怎么同時匹配兩個不同結(jié)果?8. 默認(rèn)輸出類型為json,如何輸出html9. mysql 遠(yuǎn)程連接出錯10060,我已經(jīng)設(shè)置了任意主機(jī)了。。。10. 為何 localStorage、sessionStorage 屬于html5的范疇,但是為何 IE8卻支持?
