• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
php Include, what is the right approach in Code Igniter?

I have some common files in my project like footer.php, menu.php etc..
Normally I would include them like so:

include 'footer.php';

What is the best practice to do this in CI?

Assuming your refering to just view files, such as header, menu, footer, then you put each on into a php file in the view folder, you can then call them using

You can either call each part seperatly, or create a master view file, which then calls the sub views

Make sense?

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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