Change Default Controller

When we run our codeigniter project. It searches a default controller already existed as Welcome file in contoller.

eg :



Now we have to change default controller already existed as welcome.

Step 1 : To change default controller. First open, routes.php file which is already existed in application/config folder.

eg :


Step 2 : Replace welcome in default controller into project .


Previous Code : $route['default_controller'] = 'welcome';

New Code : $route['default_controller'] = 'project';


Step 3 : Now, create a file (Project.php) in controller folder. So that replaced file can easily run by default controller. 

eg :



Source Code:

Codeigniter tutorial for beginners

In this project. We are providing you, how to create small project in Codeign....

Source Code