Server Side Includes

Server Side Include (SSI) commands are executed by the server as it parses your HTML file. Server side includes have a variety of uses including displaying the date and time and adding a common signature to each of your web pages.

HTML files containing SSI must be named with the extension .shtml. SSI commands are easy to add to your HTML, but you must follow the syntax exactly:

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

A summary of the most popular SSI commands available on our servers are listed below. Please note that whilst it is possible to execute a CGI program from a server side include, this feature is disabled on our systems due to the security issues it presents.

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 date 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

For 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.

<!--#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.

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

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

CGI Scripts

Our UNIX servers have the capability to run CGI scripts written in Perl. There are a number of...

Free CGI Scripts

There are a number of CGI scripts offered free of charge which you can install automatically...

CGI Script - Counter

Counter is a free CGI script which you can install onto your account via the CGI Scripts page....

CGI Script - Mailform

Mailform is a free CGI script which you can install onto your account via the "CGI Scripts" page...

Unix SSL

Secure Socket Layer (SSL) allows a secure communication channel to be set up between the server...