• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is it possible in codeigniter 3x.

#1
Lightbulb 
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 | (Skype : shakil.ahmed572)
Reply

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

#3
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 | (Skype : shakil.ahmed572)
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.