php7使用SSL協定存取webservice出現問題
不是我
不是我 2022-03-20 16:31:22
0
1
1024

錯誤為: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:\www\compare.php:22 Stack trace: #0 D:\www\compare.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

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板