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

(06-01-2020, 01:48 PM)jreklund Wrote: Hi, here are the complete path.

index.php -> system/core/CodeIgniter.php -> system/core/Router.php

__construct() -> _set_routing() -> _parse_routes() -> _set_request() -> _validate_request()

In _validate_request it tests if that's a directory or not.

This answer is SPOT ON. Thank you Sir. (__construct() -> _set_routing() -> _parse_routes() -> _set_request() -> _validate_request() where did you get that sequence from? it is not in the documentation Smile )



Now one final question: when I placed the default controller "Home" in the new sub-folder "site", and typed:
localhost/site/home   ==> things just work Smile .

But when I type:
localhost/site/   ==> it doesnot work Sad

I tried: $route['default_controller'] = 'Home'; ==> this didn't work
So I changed it to $route['default_controller'] = "site/Home"; ==> still didn't work.
How should I set the default-controller in this case?

Thx a ton again.
Reply


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



Theme © iAndrew 2016 - Forum software by © MyBB