How to configure default controller in codeigniter

Uncategorized 0 Comment 8

In codeigniter 1.7.3 configure directly in the routes.php file under application -> config folder
$route['default_controller'] = "welcome";
In codeigniter 2.0 we can configure in two ways
1. In index .php under the route folder. In index.php we can configure the routing folder, controller and particular function under the controller this routing maps to the controller folder under the application folder.
$routing['directory'] = ''; (routing folder path)
$routing['controller'] = '';(routing controller)
$routing['function'] = ''; (routing function)
2. In routes.php under the application -> config folder
$route['default_controller'] = "welcome";

Leave a comment

You must be logged in to post a comment.

© 2016 4frienz. Powered By Flowers

Back to Top