douben7493
2012-09-16 10:29
浏览 21
已采纳

在codeigniter中调试路由?

I am wondering if there is any simple way of debugging routes in code igniter?

preferably I would like to be able to see in the log along the lines of:

Client sent : apps/something
Route found : apps/(:any) --> applications/searchbyname/$1
Redirecting : apps/something --> applications/searchbyname/something
//and just cause we can lets make the searchbyname function not exist
ERROR - 2012-09-16 22:10:05 --> 404 Page Not Found --> applications/searchbyname/something

Basically it means we can see when we hit a route and where it is trying to load.

Is there any way to enable something along these lines?

  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dsa1234569 2012-09-16 11:17
    已采纳

    Just wrote a small extension of the Router core system class:

    https://github.com/Philo01/CodeIgniter-Route-Debugging

    It wil debug just the way you described. ( except for the 404, I still need to add that )

    已采纳该答案
    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题