Home  >  Article  >  Backend Development  >  Solution to error reporting using CURL in PHP rip curl php curl open curl under

Solution to error reporting using CURL in PHP rip curl php curl open curl under

WBOY
WBOYOriginal
2016-07-29 08:49:591638browse

Prepare to use CURL to implement get and post methods to report errors.

Eg: When CURL is initialized, the following error is reported:

Fatal error: Call to undefined function curl_init() in C:wampwwwwebindex.php on line 4

This error should be that the PHP configuration needs to add extension configuration to enable CURL . Open the php.ini file under the PHP installation directory, find the line; extension=php_curl.dll, remove the previous comment symbols ; , and save it.

Then check whether there is this dll under the extension_dir directory. I searched here and it is there. If not, you need to download it online. At this time, the problem of restarting the Apache service still exists.

Next step, modify the httpd.conf file under the Apache service directory and add the following two lines at the end:

LoadFileC:/wamp/bin/php/php5.4.16/libeay32.dll

LoadFileC:/wamp/bin/php /php5.4.16/ssleay32.dll

(C:/wamp/bin/php/php5.4.16 is my PHP installation directory)

I did the above according to the method on the Internet, but it was still the same error as before, and suddenly I saw the installation After WAMP, there is a WAMPSERVER, click it, there is PHP -> PHP extension, select php_curl, run the web page and find that it is OK.

The above introduces the solution to error reporting using CURL in PHP, including curl and solution content. I hope it will be helpful to friends who are interested in PHP tutorials.

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