gpt4 book ai didi

php - 无法使用 file_get_contents 找到包装器 "https"

转载 作者:可可西里 更新时间:2023-10-31 22:47:28 26 4
gpt4 key购买 nike

使用 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com