我正在使用带有HMVC的Code igniter,
我们正在创建插入式模块。
我有点困惑的是路由。
我可以添加
$route['gallery/categories'] = 'gallery/categorieseditor';
$route['gallery/categories/(:any)] = 'gallery/categorieseditor/$1';
到主routes.php配置文件,它工作正常。
但我不想编辑模块的主路径文件。
我希望我可以将其放入routes.php
中的/modules/gallery/config/
文件中,但访问该网址只会给我一个404(访问/gallery/categorieseditor
作品)。
如何启动并运行?
答案 0 :(得分:2)
您的代码中有错误:
$route['gallery/categories/(:any)] = 'gallery/categorieseditor/$1';
应该是:
$route['gallery/categories/(:any)'] = 'gallery/categorieseditor/$1';