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. css3 - 手机网页中用css写1px的描边,为什么需要加一句overflow:hidden才能真正显示1px?2. mysql - 一个表和多个表是多对多的关系,该怎么设计3. mysql新建字段时 timestamp NOT NULL DEFAULT ’0000-00-00 00:00:00’ 报错4. python - type函数问题5. php - 第三方支付平台在很短时间内多次异步通知,订单多次确认收款6. Mysql && Redis 并发问题7. javascript - 百度echarts series数据更新问题8. css3 - css before 中文乱码?9. javascript - node服务端渲染的困惑10. css - 求推荐几款好用的移动端页面布局调试工具呢?
