Google News
logo
CodeIgniter - Interview Questions
What is the default controller in CodeIgniter?
The file specified in the default controller loaded by default when no file name is mentioned in the URL. By default, it is welcome.php which is the first page to be seen after installing CodeIgniter.
 
With URL
localhost/codeigniter/  
Welcome.php will be loaded as there is no file name mentioned in the URL.
 
Although as per your need, you can change the default controller in the file application/config/routes.php.
$route['default_controller'] = ' ';  
Here, specify your file name which you want to be loaded by default.
Advertisement