Welcome Guest, Not a member yet? Register   Sign In
Is it possible in codeigniter 3x.
#1
Lightbulb 
(This post was last modified: 12-25-2015, 11:12 PM by Php.)

Hello Brothers,
I'm working with codeigniter since 2.5 year And I love this framework.
But now i need/want to add sub-directories in controller or model folder.
I tried this but getting 404 error.

PHP Code:
controller/Admin/Admin.php 
PHP Code:
models Admin model_admin.php 

Many Thanks. Smile
Web Developer
Reply
#2

Keep the dir name in lowcase, and Class file in Ucfirst,and try again
Reply
#3

(This post was last modified: 12-26-2015, 12:16 AM by skunkbad.)

The docs show how to load models in subdirectories here:
https://www.codeigniter.com/user_guide/l...oader.html

PHP Code:
$this->load->model('admin/model_admin'); 

As for the controllers in subdirectories, see here:
https://www.codeigniter.com/user_guide/g...irectories
Reply
#4

(12-26-2015, 12:16 AM)skunkbad Wrote: The docs show how to load models in subdirectories here:
https://www.codeigniter.com/user_guide/l...oader.html

PHP Code:
$this->load->model('admin/model_admin'); 

As for the controllers in subdirectories, see here:
https://www.codeigniter.com/user_guide/g...irectories

Thank you.
Web Developer
Reply




Theme © iAndrew 2016 - Forum software by © MyBB