PHP Includes

PHP includes make managing your website so much easier. With PHP includes, you can change layouts faster, edit multiple pages, and skin you site!
To use PHP includes, you must convert all of your .html or .htm files to .php
Freewebs, Bravehost, Geocities, etc. don't allow PHP includes.

header.php

First make a new html page. Change the file extension to .php but make sure not to make it .php.html! It should include the following:


It's ok if your coding looks different than mine. If you use the code above, make sure to change the parts that say yoursite.com and yourstylesheet.css and the positioning of the content and sidebar.

footer.php

Now make another page called footer.php
It should include the following:


You can also add a copy right note or disclaimer before the </body> tag.

content pages

Use the following code in all of your pages:


Make sure to delete the space between < and ? and between ? and >.
On the index.php page you can put all of your homepage content for your site.

This might take a couple of times but it makes life so much easier once you get the hang of it!