Unable to find the wrapper "https"错误的解决办法

简介: PHP.ini默认配置下,用file_get_contents读取https的链接,就会如下错误:Warning: fopen() [function.fopen]: Unable to find the wrapper "https" - did you forget to enable it when you configured PHP?这个错误分3种解决方案:1.windows下的PHP,只需要到php.ini中把extension=php_openssl.dll前面的;删掉,重启服务就可以了。

PHP.ini默认配置下,用file_get_contents读取https的链接,就会如下错误:
Warning: fopen() [function.fopen]: Unable to find the wrapper "https" - did you forget to enable it when you configured PHP?

这个错误分3种解决方案:
1.windows下的PHP,只需要到php.ini中把extension=php_openssl.dll前面的;删掉,重启服务就可以了。

2.linux下的PHP,就必须安装openssl模块,安装好了以后就可以访问了。

3.如果服务器你不能修改配置的话,那么就使用curl函数来替代file_get_contents函数,当然不是简单的替换啊。还有相应的参数配置才能正常使用curl函数。    

如何联系我:【万里虎】www.bravetiger.cn 【QQ】3396726884 (咨询问题100元起,帮助解决问题500元起) 【博客】http://www.cnblogs.com/kenshinobiy/
目录
相关文章
|
存储 网络安全 Windows
接口测试|Charles证书的设置(抓HTTPS数据包)&SSL证书过期解决办法
接口测试|Charles证书的设置(抓HTTPS数据包)&SSL证书过期解决办法
510 0
接口测试|Charles证书的设置(抓HTTPS数据包)&SSL证书过期解决办法
|
8月前
完美解决 fatal: unable to access ‘https://github.com/Homebrew/brew/‘
完美解决 fatal: unable to access ‘https://github.com/Homebrew/brew/‘
324 0
|
2月前
|
前端开发 应用服务中间件 网络安全
在Apache上http强制跳转到https无效的解决办法
在Apache上http强制跳转到https无效的解决办法
|
2月前
|
Linux 开发工具 git
【开发专题_03】unable to access ‘https://github.com/deviantony/docker-elk.git/‘: Failed connect to github
【开发专题_03】unable to access ‘https://github.com/deviantony/docker-elk.git/‘: Failed connect to github
|
4月前
【Error】fatal: unable to access ‘https://github.com/PanJiaChen/vue-element-admin/‘: OpenSSL SSL_read:
【Error】fatal: unable to access ‘https://github.com/PanJiaChen/vue-element-admin/‘: OpenSSL SSL_read:
|
9月前
|
网络协议 C++ Docker
Docker pull拉取镜像报错“Error response from daemon: Get "https://registry-1.docker.io/v2”解决办法
Docker pull拉取镜像报错“Error response from daemon: Get "https://registry-1.docker.io/v2”解决办法
2763 0
|
开发工具 git
fatal: unable to access ‘https://github.com/.../.git‘: Could not resolve host: github.com解决方法【亲测有效】
1.问题原因 今天在使用Github的时候突然出现了这样的报错,云里雾里,看了网上的解决办法,说是代理服务器的问题,尝试了无数遍无果 然后Ping了一下github网站,发现Ping不通:
1308 0
|
11月前
|
开发工具 git
fatal: unable to access ‘https://github xxxxxxxxx的解决方法
fatal: unable to access ‘https://github xxxxxxxxx的解决方法
474 0
|
Linux iOS开发 MacOS
IIS10 部署网站报【HTTP 错误 500.19 - Internal Server Error】的解决办法
原有的 web 发布文件是可以正常部署 IIS10 上面运行的,由于本地电脑环境迁移,重新换了一个宿主机部署 IIS10,网站运行提示如下信息:HTTP 错误 `500.19 - Internal Server Error` 无法访问请求的页面,因为该页的相关配置数据无效。详细错误信息:模块 `IIS Web Core` 通知 `未知 处理程序 尚未确定 错误...
1484 0
IIS10 部署网站报【HTTP 错误 500.19 - Internal Server Error】的解决办法
|
Java Spring
Initialization failed for ‘https://start.spring.io‘ Please check URL, network and proxy settings解决办法
Initialization failed for ‘https://start.spring.io‘ Please check URL, network and proxy settings解决办法
1993 1
Initialization failed for ‘https://start.spring.io‘ Please check URL, network and proxy settings解决办法