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.

Related questions

0 votes
asked Dec 29, 2020 in CodeIgniter by SakshiSharma
0 votes
asked Dec 30, 2020 in CodeIgniter by SakshiSharma
...