CodeIgniter: How to get Controller, Action, URL information

You could use the URI Class:

$this->uri->segment(n); // n=1 for controller, n=2 for method, etc

I’ve also been told that the following work, but am currently unable to test:

$this->router->fetch_class();
$this->router->fetch_method();

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)