2011-01-23 112 views
10

我使用Apache v2.2.17和PHP v5.3.5安裝了wampserver。 當我使用功能file_get_contents()與HTTPS URL作爲參數,我得到以下警告:安裝後配置wampserver以啓用ssl

警告:file_get_contents()函數 [function.file-GET-內容]:無法 找到包裝「 https「 - 你 忘記啓用它,當你配置PHP ?在 C:\ WAMP \ WWW \ fbapp \的index.php上線22

是否有配置wampserver啓用SSL而無需重新安裝它的方法嗎?

+0

您可以使用[cURL functions](http://php.net/curl)進行SSL請求。 – Lekensteyn

回答

38

我看着它,你應該:

  1. 檢查ssl_module在Apache模塊。
  2. 在PHP擴展中檢查php_openssl

工作! :)

0

並檢查一兩件事:

如果沒有找到文件,以及它可能會給出一個錯誤。所以使用這個:

[email protected]_get_contents(path); 

if($f){ 
    // your code here... 
}