技术频道导航
HTML/CSS
.NET技术
IIS技术
PHP技术
Js/JQuery
Photoshop
Fireworks
服务器技术
操作系统
网站运营
Python技术
AI技术

赞助商

分类目录

赞助商

最新文章

搜索

【解决】PHP:file_get_contents(): Unable to find the wrapper https

作者:admin    时间:2026-4-22 11:41:3    浏览:

今天使用PHP函数file_get_contents()抓取某网页,抓取HTTP网页没问题,但抓取HTTPS网页时就报错:

Warning: file_get_contents() [function.file-get-contents]: Unable to find the wrapper "https" - did you forget to enable it when you configured PHP?

中文意思是 file_get_contents() 不能找到包装器 https ,是否配置PHP时没有允许?

如此说来,应该时PHP配置问题,而PHP的配置文件是php.ini

经查询,说是要允许ssl,只需修改 php.ini 的一个地方。

于是来到php的安装目录,打开 php.ini,把下面语句前面的分号“;”去掉即可。

;extension=php_openssl.dll

允许php_openssl

最后,不要忘了重启Web服务器。

这样,问题就解决了。

相关文章

标签: php  file_put_contents  https  
本站声明:本站为非经营性网站,文章内容来源或整理于网络,本站不提供软件下载服务,侵删联系:webkaka#foxmail.com
x