I have picked up a quick PHP project that I need the use of the php_curl
library.
I am having difficulty getting to recognize the library when I used it in my code. I have researched many different ways to install, and use the php_curl
library, which comes with PHP, but apparently is not enabled.
Can anybody assist me in allowing my php to recognize when I make a simple call 开发者_开发知识库such as the following:
$ch = curl_init();
so that it does not tell me that it does not recognize the function name.
echo phpinfo()
and find the word curl if curl is not there
By default CURL is not enabled with php You have to enable.
uncomment the line ;extension=php_curl.dll
in php.ini and restart apache
You can test if the extension is available with:
if (function_exists("curl_init")) {
curl_init();
...
}
else {
// include( PEAR Http Request2 )
}
精彩评论