我真的被这个难住了。我按照 http://code.google.com/apis/gdata/articles/php_client_lib.html#php-path-installation上的说明进行操作 PHP 安装检查器(可以在链接页面上找到)给我一个错误,包括dir 是错误的,所以我试图确定这不是问题所在。
这是我的目录的样子:
[...]/httpdocs/include/library/Zend# ls
Exception.php Gdata Gdata.php Http Loader.php Registry.php Uri Uri.php Validate Version.php test.php
如您所见,我的 test.php 和 Loader.php 在同一个文件夹中。
[...]httpdocs/include/library/Zend# cat test.php
<?php
require_once("Loader.php");
echo "ok";
?>
这个错误出现在我的 error.log 中:
PHP Fatal error: require_once(): Failed opening required 'Loader.php' (include_path='.:') in /var/www/vhosts/[domain]/httpdocs/include/library/Zend/test.php on line 2
我还尝试设置绝对包含路径:
[...]httpdocs/include/library/Zend# cat test.php
<?php
$clientLibraryPath = '/var/www/vhosts/[domain]/httpdocs/include/library/Zend';
$oldPath = set_include_path(get_include_path() . $clientLibraryPath);
echo get_include_path();
require_once("Loader.php");
?>
它确实 echo .:/var/www/vhosts/[domain]/httpdocs/include/library/Zend 但又一次:
PHP Fatal error: require_once(): Failed opening required 'Loader.php' (include_path='.:/var/www/vhosts/[domain]/httpdocs/include/library/Zend') in /var/www/vhosts/[domain]/httpdocs/include/library/Zend/test.php on line 6
来自 phpinfo() 的一些信息:
PHP API => 20090626
PHP Extension => 20090626
Zend Extension => 220090626
Zend Extension Build => API220090626,NTS
PHP Extension Build => API20090626,NTS
PHP Version => 5.3.2-1ubuntu4.14
我真的希望你们能帮助我..这让我发疯