Support Area: SSI (Server Side Includes)

What are Server Side Includes?

An SSI tag is a type of HTML comment that directs the server to dynamically generate data for the visitor. Pages that contain SSI tags are parsed (read) by the server, which looks for SSI tags and executes them when found.

The simplest command is '#include', which inserts the contents of another file into the output displayed in the visitor's browser. This is especially useful for including standard headers and footers that are the same on all pages throughout a site. To change the content of a header for all pages, you need only modify the included file, instead of updating every individual page.


How do I use SSI?

In order for the server to properly parse your document, it must end with an extension of .shtml. The SSI tags are embedded in your HTML code. A typical tag looks like:

<!--#command parameter="argument"…>

For example, this line of code:

The current GMT time is: <!--#echo var="DATE_GMT"-->

will display the Greenwich Mean Time in the visitor's browser.

A good listing of the various SSI tags and variables that can be used is located here:
http://www.anu.edu.au/CNIP/authors/resources/ssisum.html

IMPORTANT NOTE: The EXEC CMD tag is disabled for security reasons. You may however use EXEC CGI or INCLUDE VIRTUAL for similar results.


Where can I learn more about SSI?

Here are 2 good resources for SSI tutorials:

http://hoohoo.ncsa.uiuc.edu/docs/tutorials/includes.html

http://bignosebird.com/ssi.shtml

 


Back to Support Library

Can't find what you're looking for? Check out the Support FAQ & Knowledge Base or visit the new Assistance Center!

©2004 5DollarHosting.com®, all rights reserved
Terms and Conditions