无法找到包装器"https"与file_get_contents [英] Unable to find the wrapper "https" with file_get_contents
问题描述
使用https://网址调用file_get_contents()会给我以下错误:
Calling file_get_contents() with https:// urls give me the following error:
warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP?
我已经阅读了10多个SO问题,并且所有人都说启用extension=php_openssl.dll
I've read 10+ SO questions and all of them say to enable extension=php_openssl.dll
我这样做了,但仍然有问题...
I did this and I'm still having issues...
那还能是什么?
推荐答案
已解决
要解决此错误,您需要在网络服务器上为PHP安装OpenSSL
软件包.
To solve this error, you need to install the OpenSSL
package for PHP on your webserver.
在 FreeBSD 服务器上,您可能需要安装以下软件包:php53_openssl
并重新启动Web服务器.
On a FreeBSD server, you may need to install the following package: php53_openssl
and restart your webserver.
在 Windows 服务器上,打开您的php.ini
配置文件,只需取消注释以下行:
On a Windows server, open your php.ini
config file and simply uncomment the following line:
;extension=php_openssl
,然后重新启动Web服务器.该错误应得到解决.
and restart the webserver. The error should be resolved.
参考:我从对我有用的此链接中获取了建议. ,因此功劳归功于他.
Reference: I leart it from this link which worked for me.., so credit goes to him.
这篇关于无法找到包装器"https"与file_get_contents的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!