Fatal error: Call to undefined function curl_init

Source: Internet
Author: User

Resource curl_init ([string $ url = null])

Modify configuration:
1. Modify the php Tutorial. ini and remove the semicolon before extension = php_curl.dll.
2. Copy the libeay32.dll and ssleay32.dll (c: apps tutorial ervphp5) files to the system32 directory.
3. Restart apache (services. msc).

<? Php
Echo "curl-function test <br> ";
If ($ load = 1 ){
Function webcheck ($ url ){
$ Ch = curl_init ($ url );
Curl_setopt ($ ch, curlopt_returntransfer, 1 );
$ Res = curl_exec ($ ch );
Curl_close ($ ch );
Return ($ res );
}
Echo "url = $ url <br> ";

$ Erg = webcheck ("my_page.php/test_1.php ");
$ Zahl = strlen ($ erg );
Echo "length = $ zahl ";
?>

If you encounter fatal error: call to undefined function curl_init () during usage, try the following operations:

Check whether curl extension support is available in php phpinfo!

Copy php_curl.dll to c: windows and c: windowssystem32 and restart apache.
Try again later

This file is not php_curl.dll.
Copy libeay32.dll and ssleay32.dll in the php directory to c: windowssystem32 and restart apache.
For more details, see: http://www.111cn.net/phper/31/83bccb7f05107b9ba65c22ce4dae1bf8.htm

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.