Posted By

aelien on 11/17/10


Tagged

codeigniter


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

marceloabelda
fana
fireball70
andreagam


Get current controller/method name in Codeigniter


 / Published in: PHP
 

this gives you the real controller/method names, even if you reroute them.

  1. //current controller
  2. $this->router->class;
  3.  
  4. //current method
  5. $this->router->method;

Report this snippet  

You need to login to post a comment.