码迷,mamicode.com
首页 > Web开发 > 详细

php命令行运行出现错误Call to undefined function curl_init()

时间:2014-11-16 22:50:12      阅读:248      评论:0      收藏:0      [点我收藏+]

标签:style   io   color   sp   on   cti   amp   ef   c   

在windows命令行窗口下运行php命令,需要将php.exe所在的路径添加到Path环境变量,例如C:\wamp\bin\php\php5.4.3

启动Apache服务

在命令行中输入php test.php

出现错误Call to undefined function curl_init()

因为test.php中用到了php_curl扩展

运行时出现“Call to undefined function curl_init”这个错误提示,没有定义的函数,也就是php还没打开对curl_init函数的支持。

打开php.ini,找到“extension=php_curl.dll”,然后去掉前面的“;”注释,重启apache即可。

php命令行运行出现错误Call to undefined function curl_init()

标签:style   io   color   sp   on   cti   amp   ef   c   

原文地址:http://www.cnblogs.com/coolbear/p/4102467.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!