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. macos - 無法source activate python272. 運行python程序時出現“應用程序發生異常”的內存錯誤?3. javascript - 微信 H5 授權 返回鍵4. github - 求助大神啊,win10 git clone error,折騰了幾天都不行,以前原本好好的,突然就這樣了5. android - 如何實現QQ pad 點擊右側輸入框,只頂右側的布局,左側布局不動6. javascript - npm run build后調用api返回index.html7. css - 關于background-position百分比的問題?8. java - 處理數據關聯關系,使用數據庫表外鍵和代碼內維護相比的優缺點?9. javascript - node得到req不能得到boolean10. 小白學python的問題 關于%d和%s的區別

網公網安備