In PHP, if you configure and install it, curl series functions are generally not supported by default. If you want your PHP environment to support curl functions, we can refer to the following method to solve it.
Modify your php configuration and remove the semicolon in extension=php_curl.dll in php.ini;
Then restart apache and test to see if it works. Generally speaking, it is ok. If it still doesn’t work, we can
1. Copy the three files in the PHP folder
php_curl.dll,
libeay32.dll,
ssleay32.dll
Copy to system32;
3. Restart apache.
Test
The code is as follows
代码如下 |
复制代码 |
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,”http://www.bKjia.c0m”);
curl_setopt($ch,CURLOPT_HEADER,1);
curl_exec($ch);
curl_close($ch);
?>
|
|
Copy code
|
|
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,”http://www.bKjia.c0m”);
curl_setopt($ch,CURLOPT_HEADER,1);
curl_exec($ch);
curl_close($ch);
?>
This is successful.
http://www.bkjia.com/PHPjc/632139.htmltruehttp: //www.bkjia.com/PHPjc/632139.htmlTechArticleIn PHP, if you configure and install it, curl series functions are generally not supported by default. If you want Your PHP environment supports the curl function. We can refer to the following method to solve it. Modify...
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn