时间:2021-07-01 10:21:17 帮助过:40人阅读
解决方式之一就是试SoapClient忽略https的ssl认证,直接跳过认证的环节,直接贴代码吧
$context = stream_context_create( array ( 'ssl' => array ( 'verify_peer' => false, 'allow_self_signed' => true ),));$options['stream_context'] = $context;$client = new SoapClient($url, $options);
verify_peer:指定是否验证ssl,默认为true
allow_self_signed:是否允许自建证书的https服务,默认为false
贴上官方的文档:http://php.com/manual/en/context.ssl.php