Zend Framework include path

2019-09-19 06:06发布

I'm trying to get the zend framework running, but the include path doesn't like me ;)
The zend directory is here http://mydomain.com/zend/

<?php
set_include_path('/var/www/www.mydomain.com/htdocs/zend/library/');

require_once 'Zend/Gdata/Youtube.php';
require_once 'Zend/Loader.php'; // the Zend dir must be in your include_path

Zend_Loader::loadClass('Zend_Gdata_YouTube');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');

?>

And I get this error:

Warning: require_once(Zend/Gdata/Youtube.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/www.mydomain.com/htdocs/zend/index.php on line 4

Fatal error: require_once() [function.require]: Failed opening required 'Zend/Gdata/Youtube.php' (include_path='/var/www/www.mydomain.com/htdocs/zend/library/') in /var/www/www.mydomain.com/htdocs/zend/index.php on line 4

I have a smiliar setup on another server where it works, but here has to be something wrong..

1条回答
Deceive 欺骗
2楼-- · 2019-09-19 06:47

I think you want:

require_once 'Zend/Gdata/YouTube.php';

(note the capital T). Your other server where it works is probably using a case-insensitive file system.

查看更多
登录 后发表回答