Call to undefined function curl_init() 解决方案-PHP

新配置的Apache+php容易报错 

Call to undefined function curl_init();

即使已经把extension=php_curl.dll前的分号去掉,curl依然加载不成功,当然上网找各种把法啦,然并卵,查手册。

 

要 PHP 支持 cURL,必须在编译 PHP 时加上 --with-curl[=DIR] 选项,DIR 为包含 libinclude 的目录路径。在 include 目录中必须有一个名为curl,包含了easy.hcurl.h 的文件夹。lib文件夹里应该有一个名为libcurl.a的文件。对于 PHP 4.3.0 你可以配置 --with-curlwrappers 使 cURL 使用 URL 流。

Note: Win32 用户注意
要在 Windows 环境下使用这个模块,libeay32.dllssleay32.dll 必须放到 PATH 环境变量包含的目录下。 不用 cURL 网站上的libcurl.dll。  

搞定。

遇到问题别老想着去网上找答案,先查查手册吧

 

posted @ 2017-03-30 09:49  挨踢屌丝  阅读(3168)  评论(0编辑  收藏  举报