【发布时间】:2013-04-14 20:25:14
【问题描述】:
我对@987654321@ 的 HMVC 模块有些苦恼
重点是:似乎每个人都可以在 HMVC 中使用子目录(例如这里:here),方法是将其添加到 /application/config/config.php 中的 config.php 文件中:
$config['modules_locations'] = array(
APPPATH.'modules/' => '../modules/',
APPPATH.'modules/' => '../modules/test',
);
但是,它对我不起作用。似乎这条线被完全忽略了。
我尝试过的:
制作了以下文件:
-modules
-- foo
-- -- controllers
-- -- -- test.php
-- test
-- -- bar
-- -- -- controllers
-- -- -- -- baz.php
foo/test 有效,即使我删除了完整的 $config['modules_locations'] 行。但 test/bar/baz 没有。
Wiredesignz 的联机帮助页说:
Modules::$locations 数组可以在 application/config.php 中设置 文件。
这似乎是一个错字(application/config/config.php 更符合逻辑),但我什至尝试过(但没有运气)。
这里出了什么问题?
Tnx :)
编辑:“它不起作用”我的意思是我得到了 404。
【问题讨论】:
-
尝试将最长路径放在您的配置中,看看是否有任何不同。
-
@WahyuKristianto:因为我想将管理模块与其他模块分开。
-
@ahmad 不,没有区别。
标签: php codeigniter hmvc