Zend 从配置文件设置 includePaths

发布于 2024-12-09 06:40:10 字数 386 浏览 1 评论 0原文

我有一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

初见 2024-12-16 06:40:10

你的路径是错误的,确保你这样做

includePaths.library = APPLICATION_PATH "/../library"

Your path is wrong make sure you do like this

includePaths.library = APPLICATION_PATH "/../library"
落叶缤纷 2024-12-16 06:40:10

你不能那样做。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文