本文介绍了TwitterOAuth 抱怨未定义的常量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用 https://github.com/ricardoper/TwitterOAuth 让示例工作
I am trying to get examples to work using https://github.com/ricardoper/TwitterOAuth
这是我得到的:
Notice: Use of undefined constant CURLOPT_URL - assumed 'CURLOPT_URL' in /var/www/twitter/TwitterOAuth-1/TwitterOAuth/TwitterOAuth.php on line 448
Notice: Use of undefined constant CURLOPT_HEADER - assumed 'CURLOPT_HEADER' in /var/www/twitter/TwitterOAuth-1/TwitterOAuth/TwitterOAuth.php on line 449
Notice: Use of undefined constant CURLOPT_HTTPHEADER - assumed 'CURLOPT_HTTPHEADER' in /var/www/twitter/TwitterOAuth-1/TwitterOAuth/TwitterOAuth.php on line 450
Notice: Use of undefined constant CURLOPT_RETURNTRANSFER - assumed 'CURLOPT_RETURNTRANSFER' in /var/www/twitter/TwitterOAuth-1/TwitterOAuth/TwitterOAuth.php on line 451
Notice: Use of undefined constant CURLOPT_SSL_VERIFYPEER - assumed 'CURLOPT_SSL_VERIFYPEER' in /var/www/twitter/TwitterOAuth-1/TwitterOAuth/TwitterOAuth.php on line 452
Fatal error: Call to undefined function TwitterOAuth\curl_init() in /var/www/twitter/TwitterOAuth-1/TwitterOAuth/TwitterOAuth.php on line 460
我错过了这里的一些图书馆吗?
did I miss some libraries here?
推荐答案
问题是没有安装php5-curl.所以按照步骤应该可以解决问题.
The problem is that the php5-curl is not installed. so following the steps should solve the problem.
sudo apt-get install php5-curl
sudo service apache2 restart
这篇关于TwitterOAuth 抱怨未定义的常量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!