By Unknown → Monday, December 29, 2014
Untuk mendapatkan nama controller / method menggunakan framework codeigniter, gunakan perintah $this->router->fetch_class() dan $this->router->fetch_method().

http://localhost/index.php/controller/method

Contoh Penggunaan :
class Someclass extends CI_Controller { function index(){ echo $this->router->fetch_class(); // will output the current controller echo "<br>"; echo $this->router->fetch_method(); // will output the current method } }
Martin Tobing

I'm Martin Tobing. A full time web programmer. I enjoy to make website and web application in PHP.

1 One Comment " Mendapatkan Nama Controller / Method menggunakan CodeIgniter "

Sukrala IT Services Pvt. Ltd. May 24, 2018 at 6:00 PM

php training in chandigarh
Awesome and very appreciating blog
Thanks for sharing
It really helped me alot