Server Side Includes (SSI)

Tags SSI

Overview

Server Side Includes (SSI) is a simple interpreted server-side scripting language used for webpages. The most common use of SSI is to include the contents of one or more files that are hosted on a web server into a single webpage.

To include the contents from another file in your page, insert the following code:

  • <!--#include virtual="path/includename"-->

Where path = the path to your file and includename = the name of the file you want to include. For personal homepages, here is a syntax example:

  • <!--#include virtual="/~username/text.txt"-->
    The file "text.txt" is in the public_html directory.

The page that contains the above line must have the executable permission set for world. Issue the 'chmod' command at the unix prompt:

  • chmod a+x filename.html