Loading…

What is the default controller used in CodeIgniter? How we can change it?

In CodeIgniter when a specified file in the default controller loaded by default when there is no file name mentioned in URL. By default "welcome.php" file is loaded after installing CodeIgniter.

Yes, we can change it from application/config/routes.php. We have to pass our controller name which we want to load by default in $route['default_controller']

For example, now the frontend is the default controller $route['default_controller'] = 'Frontend'; from now. Interview questions on Codeigniter are always a level up and thus a little tough to crack.

Suggest An Answer

No suggestions avaliable!

Latest post from CodeIgniter Interview Questions

Ask Question