Welcome Guest, Not a member yet? Register   Sign In
Sub Folder in Code Ignitor Not Working

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

What r u exactly trying to do... ?

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.


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.

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.

Post your controller and view code


Theme © iAndrew 2016 - Forum software by © MyBB