1.

What is the default controller in CodeIgniter?

Answer»
  • When the name of the file is not mentioned in the URL then the file will be specified in the DEFAULT controller that is loaded by default. By default, the file name will be welcome.php, which is known as the first page to be SEEN after the installation of CodeIgniter.
  • localhost/codeigniter/  In this case, the welcome.php will be generally loaded as the file name is not mentioned in the provided URL. Generally, the programmers can change the default controller that is PRESENT in the application/config/routes.php file as per their needs.
  • $route['default_controller'] = ' ';In the above-given SYNTAX, the programmer has to specify the file name that he/she wants to get loaded as the default one.


Discussion

No Comment Found