不能在ubuntu 11.1上使用curl和PHP

时间:2014-05-21 05:30:06

标签: php curl

我正在尝试在我的ubuntu 11.1服务器上使用curl。

在我的脚本中,我有以下内容:

$ch = curl_init();

但是当我运行脚本时,我收到以下错误消息:

Fatal error: Call to undefined function curl_init() 

我认为没有安装Curl,但是当我执行以下操作时:

 sudo apt-get install curl libcurl3 libcurl3-dev php5-curl

我得到以下内容:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libcurl4-openssl-dev' instead of 'libcurl3-dev'
curl is already the newest version.
libcurl3 is already the newest version.

(我没有做更新)。有什么想法吗?

1 个答案:

答案 0 :(得分:0)

访问以下网址。 https://askubuntu.com/questions/9293/how-do-i-install-curl-in-php5

还通过phpinfo()

检查扩展