【问题标题】:Module specific routing using hmvc in code igniter?在codeigniter中使用hmvc的模块特定路由?
【发布时间】:2012-09-14 01:19:13
【问题描述】:

我正在使用带有 HMVC 的代码点火器,

我们正在创建插件模块。

我有点卡住的一件事是路由。

我可以添加

$route['gallery/categories'] = 'gallery/categorieseditor';
$route['gallery/categories/(:any)] = 'gallery/categorieseditor/$1';

到主 routes.php 配置文件,它工作正常。

但我不想编辑模块的主路由文件。

我希望我可以将其放入 /modules/gallery/config/ 中的 routes.php 文件中,但访问该 url 只会给我一个 404(访问 /gallery/categorieseditor 有效)。

我怎样才能启动并运行它?

【问题讨论】:

    标签: codeigniter routing hmvc


    【解决方案1】:

    您的代码中有错误:

    $route['gallery/categories/(:any)] = 'gallery/categorieseditor/$1';

    应该是:

    $route['gallery/categories/(:any)'] = 'gallery/categorieseditor/$1';

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-06-04
      • 1970-01-01
      • 1970-01-01
      • 2013-05-06
      • 1970-01-01
      • 2016-05-21
      • 2012-01-05
      • 2014-12-06
      相关资源
      最近更新 更多