Zend 框架包含路径 [英] Zend Framework include path

查看:60
本文介绍了Zend 框架包含路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试让 zend 框架运行,但包含路径不喜欢我;)
zend 目录在这里 http://mydomain.com/zend/

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');

?>

我收到此错误:

警告:require_once(Zend/Gdata/Youtube.php) [function.require-once]:无法打开流:中没有这样的文件或目录/var/www/www.mydomain.com/htdocs/zend/index.php 第 4 行

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

致命错误:require_once() [function.require]:打开失败需要'Zend/Gdata/Youtube.php'(include_path='/var/www/www.mydomain.com/htdocs/zend/library/') 在/var/www/www.mydomain.com/htdocs/zend/index.php 第 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..

推荐答案

我想你想要:

require_once 'Zend/Gdata/YouTube.php';

(注意大写的 T).它工作的其他服务器可能正在使用不区分大小写的文件系统.

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

这篇关于Zend 框架包含路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆