ubuntu14 下报PHP Fatal error: Call to undefined function curl_init()

问答中心分类: OneinStackubuntu14 下报PHP Fatal error: Call to undefined function curl_init()
rain16881 asked 8 年 ago
phpinfo 看见是curl enable

1 Answers
oneinstack answered 8 年 ago
加一个测试页面试试:

<?php 
$ch = curl_init(); 
curl_setopt ($ch, CURLOPT_URL, "http://www.linuxeye.com/"); 
curl_setopt ($ch, CURLOPT_HEADER, 0); 
curl_exec ($ch); 
curl_close ($ch); 
?>