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 frontend is default controller $route['default_controller'] = 'Frontend'; from now.

Suggest An Answer

No suggestions avaliable!

Latest post from CodeIgniter Interview Questions

Ask Question