Home > Backend Development > PHP Tutorial > Enable CURL extension in PHP to support curl() function_PHP tutorial

Enable CURL extension in PHP to support curl() function_PHP tutorial

WBOY
Release: 2016-07-13 10:32:38
Original
954 people have browsed it

When developing CMS with PHP, you need to use PHP's curl function. By default, this function needs to enable the CURL extension. If you have the right to use the host, you can enable this extension through the PHP.ini file. Method As follows:

1. Open php.ini, locate; extension=php_curl.dll, and remove the “;” in front of it.

2. Copy the three files: php_curl.dll, libeay32.dll and ssleay32.dll in the ext directory under the PHP directory to the system system32 directory, and restart IIS or apache.

3. In order to ensure whether the CURL extension is enabled, you can test it with the following code:

 view sourceprint?1

 2$ch = curl_init();

 3curl_setopt($ch,CURLOPT_URL,"www.baidu.com");

 4curl_setopt($ch,CURLOPT_HEADER,1);

 5curl_exec($ch);

 6curl_close($ch);

7?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/755614.htmlTechArticleWhen developing CMS with PHP, you need to use PHP’s curl function. By default, this function needs to be turned on. CURL extension. If you have the right to use the host, you can open this extension through the PHP.ini file. The method...
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template