dsjbest2014 2017-01-25 19:09
浏览 73

如何检查Codeigniter中哪个路由器条件正常工作

I am working on an existing project but here is problem. In router.php there are 200+ redirections and I want to know which redirection is working right now on a specific page - is there any way to know that? Thanks in advance.

  • 写回答

1条回答 默认 最新

  • dongyishe6689 2017-02-16 10:11
    关注

    I don't think there is any native way in Codeigniter to spit it out, like with knowing which database is being used for example:

    echo $this->db->database;
    

    But if you were to check your URL and note the first URI segment, which you could also get by echoing this:

    echo $this->uri->segment(1);
    

    That at least gives you which bit to look for in the routes.php file.

    I haven't seen one with 200+ routes though so not sure what kind of mess you may be reviewing.

    评论

报告相同问题?