php includes tutorial
Date Posted: July 2011
The first thing you should do is make and code your domain layout. When you are coding, you’re going to obviously have some sort of sidebar or other places besides the main content box. The main content box holds the content you want to be on the individual pages, whether its a blog or your resources or whatever you are offering on your site. Place your sidebar and any other div you have ABOVE your main content div box.
Okay now start at the line above your main content box and copy everything up to the top of the document. This always confuses people when I tell them this so here’s a screenshot:
Copy the codes ABOVE the div/content code for your main content box.
Now you need the php includes codes.
Sorry that they aren’t posted, my site won’t let me put them inside a textarea because it puts my layout coding in there >:( Stupid site. If I can make that work without an image, I will!
Now post those two codes on every page with your content in between them and your layout (header + footer) will show up on every page!
Let me know in a reply here or in the cbox! If you’re confused, feel free to leave a reply with a working link, NOT an email. I rarely send emails.