Open the Curl extension in PHP to support the curl () function

Source: Internet
Author: User
Tags curl ini

In the development of CMS with PHP, to use the PHP Curl function, the default state, this function needs to open curl expansion, with the use of the host, can be opened through the php.ini file extension, the following methods:

1, open php.ini, positioning to Extension=php_curl.dll, the front of the;

2, the PHP directory under the EXT directory: Php_curl.dll, Libeay32.dll and ssleay32.dll three files copied to the system system32 directory, restart IIS or Apache.

3. To ensure that curl extensions are turned on, the following code can be used to test:

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?>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.