When installing php , just turn on the switch –with-curl=/usr/local/curl. PHP requires that the curl directory must have include and lib directories, and there must be two files easy.h and curl.h under include, and libcurl.a must be under lib. After compilation, the files in the include directory are there, but they may not be in the lib directory yet. It was originally generated in the lib/.libs directory, so it needs to be copied to the lib directory. Situation 2: PHP has been installed, now you need to add this extension Enter the source code directory where the original PHP was installed (if it was deleted but the original compressed file is still there, just decompress it again)
and it will be in The curl.so file is generated under PHPDIR/ext/curl/moudles/. Copy the curl.so file to the extensions configuration directory and modify php.ini. The installation method of php extension cURL under Linux has been introduced. I hope it will be helpful to everyone. The article is a bit old, but the stuff is really good, haha. Let’s study carefully curl extension in php programming. This is quite useful when writing some network programs. |