我一直在努力让dropbox-php库正常工作,但我尝试使用这些类的页面输出了一个错误:
Warning: include(HTTP/OAuth/Consumer.php) [function.include]: failed to open stream: No such file or directory in /home/sensured/public_html/sensured.net/Dropbox/OAuth/PEAR.php on line 47
Warning: include(HTTP/OAuth/Consumer.php) [function.include]: failed to open stream: No such file or directory in /home/sensured/public_html/sensured.net/Dropbox/OAuth/PEAR.php on line 47
Warning: include() [function.include]: Failed opening 'HTTP/OAuth/Consumer.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/sensured/public_html/sensured.net/Dropbox/OAuth/PEAR.php on line 47
Fatal error: Uncaught exception 'Dropbox_Exception' with message 'The HTTP_OAuth_Consumer class could not be found! Did you install the pear HTTP_OAUTH class?' in /home/sensured/public_html/sensured.net/Dropbox/OAuth/PEAR.php:51 Stack trace: #0 /home/sensured/public_html/sensured.net/Dropbox/getmetadata.php(11): Dropbox_OAuth_PEAR->__construct('', '') #1 {main} thrown in /home/sensured/public_html/sensured.net/Dropbox/OAuth/PEAR.php on line 51 pear HTTP_OAUTH类已经安装(v0.2.3),但它是通过cpanel完成的,所以我不确定它在哪里,甚至不知道它是否有什么要说的。
发布于 2011-09-23 02:27:32
您需要确保PEAR的PHP目录在include_path中。
使用以下命令查找路径
$ pear config-get php_dir然后将其添加到php.ini的include_path指令中,然后重启web服务器软件以激活新的设置。
https://stackoverflow.com/questions/7519429
复制相似问题