php7使用SSL協議訪問webservice出現問題
問題描述
錯誤為: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已經打開
請問下各位大佬,怎么解決????
問題解答
回答1:系統環境為windows2012+apche2.4+PHP7.2
相關文章:
1. css3 - 我想要背景長度變化,而文字不移動,要怎么修改呢2. mysql - 記得以前在哪里看過一個估算時間的網站3. python - 有什么好的可以收集貨幣基金的資源?4. python - 啟動Eric6時報錯:’qscintilla_zh_CN’ could not be loaded5. java - 為什么第一個線程已經釋放了鎖,第二個線程卻不行?6. MySQL中的enum類型有什么優點?7. android下css3動畫非常卡,GPU也不差啊8. css3 - 純css實現點擊特效9. javascript - 關于<a>元素與<input>元素的JS事件運行問題10. html - vue項目中用到了elementUI問題
