CodeIgniter 中的 URI 路由
此链接有效 site.tv/admin/edit/ (controllers/admin/edit.php)
,但此链接无效 site.tv/admin/reg/edit/ (controllers/ admin/reg/edit.php)
控制器的路径是否太长?
This link works site.tv/admin/edit/ (controllers/admin/edit.php)
, but this doesn't work site.tv/admin/reg/edit/ (controllers/admin/reg/edit.php)
Is it too long path to controller?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你的路由应该是index.php/CLASS/METHOD/ID
引用自application/config/routes.php
例如
那么你的 url 应该是
index.php/test/hello
,index.php/test/meep 和
index.php/test/param/whataeverhere
更新:
如果您需要“多个包”,请为“包”创建子目录
,然后创建自定义路由在
application/config/
文件夹下的routes.php
Your routing should be index.php/CLASS/METHOD/ID
Quote from application/config/routes.php
for example
Then your url should be
index.php/test/hello
,index.php/test/meep
andindex.php/test/param/whataeverhere
UPDATE:
If you need "multiple packages" create subdirectories for your "packages" like in
and then create your custom routes in
routes.php
underapplication/config/
folder我认为这是 CHMOD 的问题。
检查 reg fils 是否可读。
I think it's a problem to CHMOD.
check if reg fils it's readeable.