Debugging routes in codeigniter?

江枫思渺然 提交于 2019-11-30 16:57:26

问题


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:


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 )



来源:https://stackoverflow.com/questions/12446184/debugging-routes-in-codeigniter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!