CodeIgniter Forums
Sub Folder in Code Ignitor Not Working - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Sub Folder in Code Ignitor Not Working (/showthread.php?tid=44259)



Sub Folder in Code Ignitor Not Working - El Forum - 08-09-2011

[eluser]Unknown[/eluser]
Dear All,

I have my CI application with admin section in separate sub folder. The file structure are as follows.


- application
- controllers
- admin
- login.php (login controller)
- views
- admin
- login_view.php (login view)


in the routes.php in config folder i have added routing path as

$route['admin'] = 'admin/login';

just below default controller

I have done this by googling in many websites where others responded it works perfectly to them, but not working with me.

Please help me, what is the thing i have left or mistake i have made.

Thanks in advance to everyone.

Kind Regards
Prajjwal Shakya


Sub Folder in Code Ignitor Not Working - El Forum - 08-09-2011

[eluser]mi6crazyheart[/eluser]
What r u exactly trying to do... ?


Sub Folder in Code Ignitor Not Working - El Forum - 08-09-2011

[eluser]Unknown[/eluser]
Thank you very much for quick response.

I am about to keep the admin panel of the application in the separate folder named "admin" so that i could segregate my frontend application files and backend control panel files.

Thanks
Prajjwal


Sub Folder in Code Ignitor Not Working - El Forum - 08-09-2011

[eluser]mi6crazyheart[/eluser]
Actually, i wanted to know... what CONTROLLER files & VIEW files u r using in subfolders. Then, what url u r using to call which specific controller file which showing u r d error...

PLz, show us ur code(controller + view file) also. So that, we can help u more accurately.


Sub Folder in Code Ignitor Not Working - El Forum - 08-09-2011

[eluser]danmontgomery[/eluser]
What you have is correct, and will take you to the index() method of the admin/login controller. If that's not working for you, you need to be more specific about what the error is.


Sub Folder in Code Ignitor Not Working - El Forum - 08-09-2011

[eluser]praveens[/eluser]
Post your controller and view code

Cheers!!!!