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

Solution to curl not supported in php_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 10:56:51
Original
1128 people have browsed it

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);
source:php.cn
Statement of this Website
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template