天天看點

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前面的;删掉,重新開機服務就可以了。

2.linux下的PHP,就必須安裝openssl子產品,安裝好了以後就可以通路了。

3.如果伺服器你不能修改配置的話,那麼就使用curl函數來替代file_get_contents函數,當然不是簡單的替換啊。還有相應的參數配置才能正常使用curl函數。    

如何聯系我:【萬裡虎】www.bravetiger.cn

【QQ】3396726884 (咨詢問題100元起,幫助解決問題500元起)

【部落格】http://www.cnblogs.com/kenshinobiy/