问题
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:
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.
来源:https://stackoverflow.com/questions/10836311/zend-framework-include-path