windows open Method:
1, copy the PHP directory Libeay32.dll, Ssleay32.dll, Php5ts.dll, php_curl.dll files to the System32 directory.
2, modify the php.ini: Configure good extension_dir, remove extension = Php_curl.dll before the semicolon.
3, back up Apache.
Test whether the installation was successful:
<?php
$ch = Curl_init ();
curl_setopt ($ch, Curlopt_url, "http://www.google.cn");
curl_setopt ($ch, curlopt_header,1);
Curl_exec ($ch);
Curl_close ($ch);
?>
Linux Open method: Method One
Install Curl
# wget http://curl.haxx.se/download/curl-7.17.1.tar.gz
# TAR-ZXF Curl-7.17.1.tar.gz
#./configure--prefix=/usr/local/curl
# make; Make install
Installing PHP
Just turn on the switch--with-curl=/usr/local/curl
It's OK.
This expansion library is still very good, and is a useful alternative to fsockopen and so on. Method II into the installation of the original php source directory,
CD ext
CD Curl
Phpize
./configure--with-Curl =dir
Make
A file of Curl . So will be generated under phpdir/ext/Curl /moudles/.
Copy the Curl . So file to the extensions configuration directory and modify php . ini.