有点毛病的include_path Zend框架
问题描述:
获取此错误:有点毛病的include_path Zend框架
致命错误:require_once()[function.require]:无法开口所需 '分贝/ db.php中'(包含路径='/家/ domain.ru /testerier/sites/application/../library:/home/domain.ru/testerier/sites/library:.:/usr/local/lib/php;/home/domain.ru/testerier/sites/application/models “)在上线51
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
// Define application environment
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
get_include_path(),
)).";".realpath(APPLICATION_PATH . '/models'));
它在本地机器上正常使用/home/domain.ru/testerier/sites/www/index.php。怎么了?
答
您的本地机器是windwos机器还是服务器Linux?那么你可能会遇到区分大小写的问题。 Windows不区分大小写,因此在窗口Folder
和folder
是相同的。在Linux上他们不是。也许你的library
实际上是Library
什么的。
本地网络服务器在Windows XP上。好的,我会尽量让所有的东西都小写。我将发布目录树结构的图片。 – Somebody 2010-01-30 08:27:17
这里是http://i192.photobucket.com/albums/z228/Somebi/root.jpg – Somebody 2010-01-30 08:43:51
是的,它似乎是情况敏感。但模型文件夹的确存在一些问题。我已经把它移到了一层,现在它正在工作。 更改的配置: $ includePath [] ='。'; $ includePath [] ='./../models'; $ includePath [] ='./../library'; $ includePath [] = get_include_path(); $ includePath = implode(PATH_SEPARATOR,$ includePath); set_include_path($ includePath); – Somebody 2010-01-30 08:48:02