0

我一直在努力让 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 类已安装(v 0.2.3),但它是通过 cpanel 完成的,所以我不确定在哪里,甚至不知道这是否有什么要说的。

4

1 回答 1

4

您需要确保 PEAR 的 PHP 目录位于您的include_path.

找到路径

$ pear config-get php_dir

然后将其添加到您php.iniinclude_path指令中。之后重新启动您的网络服务器软件以激活新设置。

于 2011-09-22T18:27:32.157 回答