.
Developer Spot - Web Development Tutorials
arrowDeverloper Spot  Tutorials  HTML  The Basic Uses Of SSI - Server Side Includes 
 
Development Tutorials
ASP
CGI & Perl
CSS
HTML
Java
JavaScript
Linux
PHP
XML




More Resources
Web Hosting Articles
Web Development News
PHP Manual
Web Hosting Directory
Budget Web Hosting Linux Web Hosting Small Business Hosting
Windows Web Hosting Reseller Web Hosting Web Hosting Articles

The Basic Uses Of SSI - Server Side Includes

By Sean Burns
2003-10-14
Reader Rating: 4 out of 5
Bookmark Print Version
How To Use SSI

So, how do you use it? The easiest way I have found is to design a template for your pages in your editor of choice. You then decide which parts of this page will be standard across your whole site - this will generally be the top bit (your header) and the bottom bit (your footer). If you have a menu down the left (or ads like we have) this could be an extra file - only if the menu needs to be different on different parts of your site. We include the left column as part of our header because it doesn't change.

You then copy the HTML for these sections to new files called header.html, footer.html and possibly left.html (or whatever you want to call them). Then, in the original page you have created, replace the HTML you just removed with this - <!--#include virtual="/header.html" --> for the header, <!--#include virtual="/footer.html" --> for the footer and <!--#include virtual="/left.html" --> for the left column (if required). Note that you need to call the files from the correct place - if you have put them in your root directory (where your main page is) then what we have here is correct. If you set up a new directory for them, you will need to reflect this.


Article Pages:
Introduction To SSI - Server Side Includes
How To Use SSI
Extensions And Hosting
One Last Tip On SSI

 Rate this article:   Poor          Excellent 


If you found this article interesting, you may want to read these as well:

» Using SSI's To Ease Site Maintenance

» Taming the Update Monster

» The Background-Table Combo



 
Development Tutorials: CGI & Perl - CSS - HTML - Java - JavaScript - Linux - PHP - XML
More Resources: Web Hosting Articles - Web Development News - PHP Manual