route dose not work to sub folders |
I have Front folder in the controller
and inside it i have Home.php file in the file have index function when i make this in the config/route PHP Code: $route['default_controller'] = 'Front/Home/index'; it dose not works and route to files in the sub folders of the controller dose not works , i must put the class in the controller directly to be accessed by routes . I use codeigniter 3.0 and This problem was not happened in codeigniter 2.2.0
Hi. Try it with small letters and without index at the end.
PHP Code: $route['default_controller'] = 'front/home'; Make sure your "front" directory have no capital letters in your directory structure. You can also check documentation related to URI routing.
no changes
the problem still Note that i use codeigniter 3.0 and it work fine on codeigniter 2.2.0
The fact that this has ever worked is a bug - it's a controller/method setting, not a directory/file one. This is explained in the upgrade notes.
Read again what narf said. Yes, it worked in previous version. Yes, it doesn't anymore. This is intended behaviour.
You can have as many classes in as many subdirectories (although I wouldn't advise you to do that), but there's no way to make any of them a default controller.
Thank you Narf
I now change some codes in .\system\core\Router.php , to make it read sub folders, it work fine with me, I will try it for more time To make sure there are no errors in what I change , if i dont found any problems in my codes i will thread my codes thank you again
Please don't ... you shouldn't be modifying those files yourself and the last thing that you should do is encourage others to do so.
|
Welcome Guest, Not a member yet? Register Sign In |