【问题标题】:Cannot use curl with PHP on ubuntu 11.1无法在 ubuntu 11.1 上将 curl 与 PHP 一起使用
【发布时间】:2014-07-09 14:13:55
【问题描述】:

我正在尝试在我的 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.

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

【问题讨论】:

标签: php curl


【解决方案1】:

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

还可以通过 phpinfo() 检查扩展

【讨论】:

  • 在我的问题中,我已经提到安装程序告诉我安装了 curl 并且它是最新版本
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2016-05-18
  • 2021-04-25
  • 2017-10-12
  • 2018-11-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多