php7使用SSL协议访问webservice出现问题
不是我
不是我 2022-03-20 16:31:22
0
1
811

错误为: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)
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!