Welcome Guest, Not a member yet? Register   Sign In
default controller in sub folder
#7

(This post was last modified: 11-07-2014, 02:25 AM by ciadmin.)

Funny - I was asked this question privately a few hours ago Undecided

This is what I determined...

With CI3, if you have defined your default controller to be "whatever", then the router will look for that controller inside any URI which is in fact a sub-sub-sub...directory inside application/controllers.

/my/wonderful/web/stuff would be resolved by application/controllers/my/wonderful/web/stuff/Whatever->index() using the above.

It could also be resolved by application/controllers/my/wonderful/Web->stuff().

Or it could be resolved by application/controllers/my/Wonderful->web('stuff')

Or by application/controllers/My->wonderful('web','stuff')

Oh my! Can this be right? AM I stuck in a loop? Dig into the code and check it out!

ps A matching custom route, in config/routes.php, would override the above.
Reply


Messages In This Thread
default controller in sub folder - by obozdag - 11-06-2014, 05:45 AM
RE: default controller in sub folder - by Narf - 11-06-2014, 04:23 PM
RE: default controller in sub folder - by obozdag - 11-06-2014, 08:38 PM
RE: default controller in sub folder - by Narf - 11-06-2014, 11:29 PM
RE: default controller in sub folder - by obozdag - 11-07-2014, 12:54 AM
RE: default controller in sub folder - by Narf - 11-07-2014, 02:45 AM
RE: default controller in sub folder - by ciadmin - 11-07-2014, 02:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB