如果我们安装了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
http://www.bkjia.com/phpjc/633218.htmlwww.bkjia.comtruehttp://www.bkjia.com/phpjc/633218.htmltecharticle如果我们安装了php环境但在测试用curl_init()时提示fatal error: call to undefined function: curl_init(),这个是证明我们curl没有配置好,下面我来介绍介...