The PHP method is essentially identical to Server Side Includes, except that it doesn't rely on Apache server software. So it can run on Microsoft IIs servers or any server that supports PHP. It's simple to use because you really don't need to know how to program with PHP. All you need to know is the "include()" function, which works exactly like Server Side Includes - only the mark-up is a bit different. The included file is plain old HTML.
The contents of the menu seen here on the left is actually stored in a separate HTML file.
You can update the navigation menu on your whole site, just by editing this single external file.
Its even easier than using <IFRAME>s because you don't have to worry about the TARGET attribute,
and you can add links to pages outside your own site without having to worry about them
loading inside your frameset.
Simply create your HTML pages as usual, but save them on your site with the ".php" filename extension instead of the normal ".html". This will tell the server to process the page as a PHP file and your "include" instruction will be executed before the page is sent to the user as a single, complete HTML document.
<?php include('menu.html'); ?>
That's all. Just change the filename to the one you use for your HTML file that contains the code for your menu and upload it all to your site.
If your site is running on an Apache-based server, you can add the following instruction to your .htaccess file to tell the server to treat all files ending in ".html" as PHP files:
AddType application/x-httpd-php .php .htm .html
This makes it unecessary to rename all of your pages to ".php", which can be time-consuming and cumbersome, as well as temporarily impairing your site's search engine rankings while the changes get indexed.