Which Server Side Include commands can I use on my hosting account?

Which Server Side Include commands can I use on my hosting account?

This articles explains the common SSI commands which may be used on our servers, and provides an code example.

This article applies to Unix Shared Hosting and Unix Reseller accounts and Unix Dedicated Servers.

Server Side Includes are configured automatically on your hosting account. You do not need to enable this service. SSI commands are easy to add to your HTML, but you must follow the syntax exactly;

<!--#command cmd_argument="argument_value" -->

Please note: HTML files containing SSI must be named with the extension .shtml.

A summary of the most popular SSI commands available on our servers are listed below.

The Echo Command

The echo command can be used to display the content of the server side environment variables listed below.

Variable: Description
Date_Local: Current data and time
Document_Name: File name of the main document
Document_URI: Path and file name of the main document
Last_Modified: Date and time the main document was last modified.

Example: To include the current date and time you would place the following code into your HTML document:

<!--#echo var="Date_Local" -->

 

The Fsize Command

The fsize command includes the size of a file, this might be helpful if you were to include a thumbnail image and want to display the actual file size of the original image.

Example: <!--#fsize file="image.gif" -->

 

The Include Command

This command can be used to include a signature file or company logo within an HTML document. The added document or image will appear as if it were part of the original document.

Example: <!--#include file="any.htm" -->