I am using CodeIgniter framework for my project. While working with CodeIgniter, i found that "Welcome.php" is the default controller file in CodeIgniter. But i want to make another file "Home.php" as my default controller.
I tried changing
$route['default_controller'] = 'welcome';
to
$route['default_controller'] = 'home';
in the "routes.php" file in config folder but it didn't work.
答案 0 :(得分:2)
According to the documentation
If you are using $route['default_controller'] = 'welcome';
then it will call
Welcome::index()
So, as you are changing to
$route['default_controller'] = 'home';
You should have Home::index()