# September 21, 2009 at 6:48 pm
Are there disadvantages to using php includes when building web sites in general?
I have recently come across the idea and wanted to know if I should be using them on every site that I build and why (or why not). I know they make it easier to maintain etc but is there a reason why I shouldn’t be doing it and if there aren’t good reasons, why isn’t everyone doing it?
cheers# September 27, 2009 at 12:17 pm
By the way, although includes are great and there are few downsides to them I would suggest using require() because then if the content isn’t available the rest of the site won’t load. This is good if you don’t want your navigation replaced with a load of text generated as an error message.
Otherwise includes are great!
You must be logged in to reply to this topic.