Zend 从配置文件设置 includePaths
我有一个 zend 1.11 应用程序。在 index.php 文件中,我有以下内容:
set_include_path(APPLICATION_PATH.'/library'.PATH_SEPARATOR.get_include_path());
一切正常。现在我想从配置文件中设置包含路径,所以我在其中添加:
includePaths.library = APPLICATION_PATH "/library"
但是如果我从其中删除“set_include_path” index.php 文件我收到错误(未找到库类)。
配置文件中包含路径的设置如何工作?
谢谢卢卡
I have a zend 1.11 app.In the index.php file I have the following:
set_include_path(APPLICATION_PATH.'/library'.PATH_SEPARATOR.get_include_path());
And everything works.Now I want to set the include path from the config file, so I added in it:
includePaths.library = APPLICATION_PATH "/library"
But if I remove the "set_include_path" from the index.php file I receive an error (library-classes are not found)..
How does it work the setting of the include path from config file?
Thanks
Luca
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你的路径是错误的,确保你这样做
Your path is wrong make sure you do like this
你不能那样做。
require_once 'Zend/Application.php';
^ 看到这一行了吗?在加载配置文件之前,它要求 Zend Framework 位于您的包含路径中。
You can't do that.
require_once 'Zend/Application.php';
^ See this line? It requires the Zend Framework to be in your include path before even the config file is loaded.