0 votes
in CodeIgniter by
What is the default controller in CodeIgniter?

1 Answer

0 votes
by

Whenever there is no file name is mentioned in the URL then the file will be specified in the default controller loaded by default. By default, the file name is welcome.php that is known as 

the first page that is to be seen after installing CodeIgniter.

localhost/codeigniter/  

In this case the Welcome.php will generally be loaded as if there is no file name mentioned in the URL provided.

The programmer can generally change the default controller that is present in the file application/config/routes.php as per his/her need.

$route['default_controller'] = ' '; 

In the above syntax the programmer has to specify the file name that he/she basically wants to get loaded as the default.

...