Home >Backend Development >PHP Tutorial >Solution to curl not supported in php_PHP tutorial

Solution to curl not supported in php_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-13 10:56:511122browse

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

$ch = curl_init();
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

curl_setopt($ch,CURLOPT_URL,”http://www.bKjia.c0m”);

curl_setopt($ch,CURLOPT_HEADER,1);

curl_exec($ch);

curl_close($ch);
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