Modify the default controller file in CodeIgniter
P粉205475538
P粉205475538 2023-09-16 21:57:41
0
1
530

I am using CodeIgniter framework for my project. While using CodeIgniter, I discovered that "Welcome.php" is CodeIgniter's default controller file. But I want to make another file "Home.php" as my default controller.

I tried to put in the "routes.php" file in the configuration folder $route['default_controller'] = 'welcome';Change to $route['default_controller'] = 'home'; But it didn't work.

P粉205475538
P粉205475538

reply all(1)
P粉793532469

According to the description of document

If you use $route['default_controller'] = 'welcome';, then it will call

Welcome::index()

So when you change to

$route['default_controller'] = 'home';

You should haveHome::index()

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template