resource curl_init ([ string $url = null ] )
Modify configuration:
1. Modify the php tutorial.ini and remove the semicolon in front of ;extension=php_curl.dll
2. Copy the two files libeay32.dll and ssleay32.dll (c:apps tutorial ervphp5) to the system32 directory
3. Restart apache (services.msc)
echo "curl - function test
" ;
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
" ;$erg = webcheck("my_page.php/test_1.php") ;
$zahl = strlen ($erg) ;
echo "length = $zahl " ;
?>
If fatal error: call to undefined function curl_init() occurs during use, try the following operations
Check if there is curl extension support in phpinfo() of php!
Copy php_curl.dll to c:windows and c:windowssystem32 and restart apache
Try it later
This is not the file php_curl.dll
Copy libeay32.dll and ssleay32.dll in the php directory to c:windowssystem32 and restart apache
For more details, please see: http://www.bKjia.c0m/phper/31/83bccb7f05107b9ba65c22ce4dae1bf8.htm