Jump to content

[SOLVED] Include


adam84

Recommended Posts

I was just wondering if this would work.

 

I have my php files, where I have all my html code and stuff. At the top of the page I have about five or six different include files. What I was wondering is if I make a master file, that I put all my includes in and on my html page, I just included the master file (instead of all of the other includes), would that work correctly?

Link to comment
https://forums.phpfreaks.com/topic/121564-solved-include/
Share on other sites

Yes. this is one of the nice things about having a config file for large applications. Simply setting some variables and including a config file will let you take care of all the initial includes and instantiation of any classes and such needed on the page all from one file instead of having to duplicate code at the top of every page.

Link to comment
https://forums.phpfreaks.com/topic/121564-solved-include/#findComment-626962
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.