CodeIgniter Forums
the sub-folder in the controllers folder - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: the sub-folder in the controllers folder (/thread-2562.html)



the sub-folder in the controllers folder - El Forum - 08-12-2007

[eluser]whidbey[/eluser]
my default controll In the controllers folder is "main.php"
and I create a sub folder name "admin" in the controller folder.
In my browser I enter
"localhost/index.php/admin"
it will appear the main.php controller.
and the url is the main.php's
what's that mean?
thx


the sub-folder in the controllers folder - El Forum - 08-12-2007

[eluser]whidbey[/eluser]
I add one line in routes.php
:$route['system'] = "admin/main";
and put main.php in controllers/admin folder

and now localhost/index.php/admin can see my own main controller.
Is that right??thx


the sub-folder in the controllers folder - El Forum - 08-12-2007

[eluser]sikkle[/eluser]
why not do $route['admin'] = "admin/main";


good luck.


the sub-folder in the controllers folder - El Forum - 08-12-2007

[eluser]whidbey[/eluser]
thx,Smile