Include Documents, Good Idea?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Thomas-T
Forum Newbie
Posts: 7
Joined: Thu Jul 24, 2008 11:32 am

Include Documents, Good Idea?

Post by Thomas-T »

I usually include documents in my code, such as header and footer etc. This makes it easier to make changes to these elements without having to go through all of the documents and change them individually. I was wondering if it's a good idea for me to just create loads of small documents in php and just link them all together with the include function thingy. This was, my code will look neater, and it'll be completely structured. Is this what a lot of the pros do?
Dynamis
Forum Contributor
Posts: 122
Joined: Thu Jul 10, 2008 3:15 pm
Location: Indiana, US

Re: Include Documents, Good Idea?

Post by Dynamis »

That is exactly how I code. Now I don't do extremely small include files, but for major things (header, footer, individual pages), that is definitely the way to go for clean/structured code.
Post Reply