How to get controller name and method name in codeigniter?
Get controller name and method name.
CodeIgniter is a powerful PHP framework with a very small footprint, built for developers who need a simple and elegant toolkit to create full-featured web applications.
Following codeigniter code is to get controller name and method name.
$this->router->fetch_class(); // class = controller $this->router->fetch_method(); // |