Online Manual

SSI -3-

Including Files

One of the really cool things that you can do with SSI is include external files into a web page. This is the thing that SSI is really good at, and it is very simple and straightforward. The work you can potentially save is incredible.

The concept is simple. You have a web site which has similar information on each page. Let's say you have a menu down the left side of the page and a copyright notice at the bottom. In standard HTML, you must code all of these things on each and every page. This means that in order to make a change, you must physically edit all of the pages.

Using an SSI directive called "include" you can eliminate all of this work. You specify an "include" as follows:

<!--#include file="ssi-include.htm" -->

which produces the following (click here to see ssi-include.htm).


This is the contents of ssi-include.htm, which demonstrates SSI includes.


You can include just about any type of file, including txt, htm, html or even shtml. In fact, you must be very careful not to include an shtml file which includes itself - you might put the server into an infinite loop.

If the file is somewhere within your own virtual directory, you can specify the "include virtual" statement. An example is shown below.

<!--#include virtual="/help/man/ssi-include.htm" -->

This produces the same result as the above "include file". The different is the path of the file is fully specified.


This is the contents of ssi-include.htm, which demonstrates SSI includes.


That's about how difficult it is to use SSI to include common information on web pages.

Next Page -> SSI - Exec Directive

 

Return To Menu

- Last modified on 3/16/2003 -


Home / Hosting / Domain Lookup / Support / Email Contact

© 1998-2025 Spunkyworld Internet Services - All rights reserved