我正在尝试通过SSL在PHP中进行SOAP调用,但是我收到错误:
SOAP-ERROR:解析WSDL:无法加载 'https://mydomain.com/report':无法加载外部实体 “https://mydomain.com/report”
我读了onlinle的东西并尝试用以下方法解决它:
1.将ssleay32.dll和libeay32.dll复制到windows system32目录,并在php.ini中取消注释extension = php_openssl.dll(如建议here)
2.在SoapClient实例中添加以下代码(建议here):
$context = stream_context_create(array(
'ssl' => array(
'verify_peer' => false,
'allow_self_signed' => true
)
));
$client = new SoapClient(null, array(
'location' => 'https://...',
'uri' => '...',
'stream_context' => $context
));
这两个都没有帮助,我仍然得到错误 知道该怎么做吗?