程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 網頁編程 >> PHP編程 >> 關於PHP編程 >> windows 下 php curl 的支持配置方法

windows 下 php curl 的支持配置方法

編輯:關於PHP編程

如果我們安裝了php環境但在測試用curl_init()時提示Fatal error: Call to undefined function: curl_init(),這個是證明我們curl沒有配置好,下面我來介紹介紹。

調用curl_init()函數測試,出現錯誤提示如下:
 
Fatal error: Call to undefined function: curl_init()

windowsxp 2003

首先保證你的php已經可以使用,本文不講解windows下的php配置,只是增加curl的擴展。
1、拷貝PHP目錄中的libeay32.dll 和 ssleay32.dll 兩個文件到 c:/windows/system32 目錄。
2、修改php.ini。去掉 extension = php_curl.dll 前面的分號。
3、重啟apache
完成!


windows 7/8/vasta

■You will need to change the extension_dir setting to point to the directory where your extensions lives, or where you have placed your php_*.dll files. For example:

 代碼如下 復制代碼

extension_dir = C:phpextensions


■Enable the extension(s) in php.ini you want to use by uncommenting the extension=php_*.dll lines in php.ini. This is done by deleting the leading ; from the extension you want to load.

Example #1 Enable Bzip2 extension for PHP-Windows

 代碼如下 復制代碼

// change the following line from ...
;extension=php_bz2.dll

// ... to
extension=php_bz2.dll

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved