Server Side Includes (SSI) is useful for web sites that use the same content for several pages. Examples of this kind of content are the headers, footers and table links of a web site. SSI lets you update these data easily. You just need to edit one file.
STEP 1:
Create a text document and type a line of text, like "The quick sly fox jumped over the lazy brown dog." Save this file as ssi_test.txt.
STEP 2:
Create another text file, and type in (or copy and paste) the following lines:
<HTML>
<HEAD>
<TITLE>SSI Test</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<P>This is the SSI test</P>
<P><!--#include virtual="ssi_test.txt" --></P>
</BODY>
</HTML>
The line <!--#include virtual="ssi_test.txt" --> is an SSI Directive. It tells the server to read the text file and send its content to the browser.
STEP 3:
Save this file as testing.shtml. You do this by clicking on 'File' and selecting 'Save As…' Then, select 'All File' for the 'Save as type' field. Enter 'testing.shtml' on the File Name field.
STEP 4:
The "included" text from ssi_test.txt will not display in testing.shtml while the files are still on your hard drive.
You need to upload them to your server. Upload the two new files and then point your browser to http://yourdomain.com/testing.shtml.
If the page reads:
This is the SSI test
'The quick sly fox jumped over the lazy brown dog'