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函數。   

 

 

原文轉載:http://tanning555.blog.163.com/blog/static/5297517120138791953104/


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM