使用 https://url 调用 file_get_contents() 会出现以下错误:
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
我这样做了,但我仍然遇到问题......
还能是什么?
最佳答案
SOLVED
要解决此错误,您需要在网络服务器 上安装PHP 的OpenSSL
包。
在 FreeBSD 服务器上,您可能需要安装以下软件包:php53_openssl
并重新启动您的网络服务器。
在 Windows 服务器上,打开您的 php.ini
配置文件并简单地取消注释以下行:
;extension=php_openssl
然后重新启动网络服务器。应该解决错误。
引用:我从 this link 学到的这对我有用……所以功劳归于他。
关于php - 无法使用 file_get_contents 找到包装器 "https",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18643572/