php7使用SSL協(xié)議訪問webservice出現(xiàn)問題
問題描述
錯(cuò)誤為: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)打開
請(qǐng)問下各位大佬,怎么解決????
問題解答
回答1:系統(tǒng)環(huán)境為windows2012+apche2.4+PHP7.2
相關(guān)文章:
1. javascript - js 有什么優(yōu)雅的辦法實(shí)現(xiàn)在同時(shí)打開的兩個(gè)標(biāo)簽頁間相互通信?2. css3 - Typecho 后臺(tái)部分表單按鈕在 Chrome 下出現(xiàn)靈異動(dòng)畫問題,求解決3. java - 新手做一個(gè)安卓視頻播放器,想實(shí)現(xiàn)一個(gè)進(jìn)度條,按鈕那種在視頻下方懸浮的功能,不知道思路!4. javascript - jquery怎么給select option一個(gè)點(diǎn)擊時(shí)觸發(fā)的事件,如圖 如果選擇自定義觸發(fā)一個(gè)時(shí)間?5. nginx配置server模塊的問題6. java - android代碼重構(gòu):如何把a(bǔ)pp設(shè)置里的頭像UI做成通用的?7. node.js - express請(qǐng)求的具體方法8. javascript - angular和jquery都用到了$符號(hào),一起用會(huì)不會(huì)沖突?9. 想找個(gè)php大神仿個(gè)網(wǎng)站。10. javascript - 怎樣限制同一個(gè)瀏覽器不能登錄兩個(gè)賬號(hào)
