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. javascript - sublime快鍵鍵問題2. javascript - immutable配合react提升性能?3. Apache 已經把網站根目錄的改為allow from all了,但是服務器還是不能訪問?4. 配置Apache時,添加對PHP的支持時語法錯誤5. phpstudy8.1支持win11系統嗎?6. css - 寫頁面遇到個布局問題,求大佬們幫解答,在線等,急!~7. vue.js - Vue 如何像Angular.js watch 一樣監聽數據變化8. javascript - nodejs關于進程間發送句柄的一點疑問9. 實現bing搜索工具urlAPI提交10. javascript - 移動端上不能實現拖拽布局嗎?

網公網安備