PHP Codeignitercurl_multi_init错误
这是我的代码:
class facebookConnection {
// Allow multi-threading.
private $_mch = NULL;
private $_properties = array();
function __construct()
{
$this->_mch = curl_multi_init();
$this->_properties = array(
'code' => CURLINFO_HTTP_CODE,
'time' => CURLINFO_TOTAL_TIME,
'length' => CURLINFO_CONTENT_LENGTH_DOWNLOAD,
'type' => CURLINFO_CONTENT_TYPE
);
}
我得到致命错误:调用未定义的函数curl_multi_init() in /var/www/application/libraries/facebook.php on line 123
这正在我的本地计算机上运行...这会是个问题吗?我不明白。
This is my code:
class facebookConnection {
// Allow multi-threading.
private $_mch = NULL;
private $_properties = array();
function __construct()
{
$this->_mch = curl_multi_init();
$this->_properties = array(
'code' => CURLINFO_HTTP_CODE,
'time' => CURLINFO_TOTAL_TIME,
'length' => CURLINFO_CONTENT_LENGTH_DOWNLOAD,
'type' => CURLINFO_CONTENT_TYPE
);
}
I get Fatal error: Call to undefined function curl_multi_init() in /var/www/application/libraries/facebook.php on line 123
This is running on my local machine... could that be a problem? I don't understand.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
听起来你的 PHP 中没有安装该功能。
检查 phpinfo();查看它是否已启用。
it sounds like that function is not installed in your PHP.
check phpinfo(); to see if it's enabled.
如果您安装了 WampServer .. 左键单击系统托盘中的 WampServer 图标,转到 PHP > PHP 扩展 > php_curl 启用 curl
或打开 php.ini 文件查找 ;extension=php_curl.dll 并删除“;”从一开始
If you have WampServer installed .. left click on the icon of WampServer in system tray go to PHP > PHP Extensions > php_curl to enable curl
or open your php.ini file look for ;extension=php_curl.dll and remove ";" from beginning