Welcome Guest, Not a member yet? Register   Sign In
use sub-folders for controllers, distinguish folders from controller files
#5

(06-02-2020, 11:00 AM)jreklund Wrote: Hi, I just read the source code from start to finish. It's not documented as that's not normally what people care about.

I'm not sure that CI3 support multiple home controllers as CI4 does. According to the docs, you can't move it into a folder:
https://codeigniter.com/userguide3/gener...ved-routes

But maybe you can trick it with "site/Home/index" as it thinks that "site" are your controller and "home" are your method at the moment.
__________________

If you now visit "localhost/" it won't display anything, as you just moved the default controller.
So it's better to add a specific route instead:
$route['site'] = 'site/home/index';
Thanks a ton Smile
Reply


Messages In This Thread
RE: use sub-folders for controllers, distinguish folders from controller files - by mike433 - 06-03-2020, 11:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB