Zend Framework include path

☆樱花仙子☆ 提交于 2019-12-25 02:34:30

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!