gibbo1715 Posted December 3, 2009 Share Posted December 3, 2009 All Still new to php but I ve been playing with using includes and Ithink i ve got my head around it but was looking for views really on the impact of using includes in the way I have. I guess im after what would be considered a best parctice etc..... I ve attached a very basic framework which has an index page where all the content is called from various other files i.e. header.inc.php, body.inc.php and footer.inc.php. I have also set up a config page for the content i might want to use over and over, and one for styles if not using css. Finally I have set up a my.inc.php file that i call from the index.php that containes all the paths to the other files all in one place so I can easily find what i want to update and if i want to experiment with womething new i dont need to update the whole thing, just the bit of code im interested in. Im assuming this is the best way to add themes to my site as well? Anyway if you could have a look and let me know id appreciate it, i ve made sure its well commented Gibbo [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/183866-best-way-of-using-includes/ Share on other sites More sharing options...
mikesta707 Posted December 3, 2009 Share Posted December 3, 2009 Seems good to me. What you need to remember is that "best practice" doesn't always work for everyone. If the system you have currently works best for you, and makes editing your site/adding new things easier, than all the power to you. That's not to say that certain practices aren't terrible, but as long as you stray away from bad practice, then what you are doing is most likely fine. Quote Link to comment https://forums.phpfreaks.com/topic/183866-best-way-of-using-includes/#findComment-970708 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.