Support

Server Side Includes



Dell Business Weekly Promo

 

What is a Server-Side Include and do you allow them?

Server side includes (SSI)s applied to an HTML document, provide for interactive real-time features such as echoing current time, conditional execution based on logical comparisons, querying or updating a database, sending an email, etc., with no programming or CGI scripts. An SSI consists of a special sequence of characters(tokens) on an HTML page. As the page is sent from the HTTP server to the requesting client, the page is scanned by the server for these special tokens. When a token is found the server interprets the data in the token and performs an action based on the token data. The format of a SSI token is as follows :
<!--#'<tag><variable set> '--> where :

  • <!--# is the opening identifier, a SSI token always starts with this.
  • <tag> is one of the following: echo, include, fsize, flastmod, exec, config , odbc, email, if, goto, label, break
  • <variable set> is a set of one or more variables and their values. The values allowed here and dependent on the tag and are listed below each tag listed below. The format of a variable set is as follows : <variable name> '=' '"' variable data '"' <variable name2> '=' '"' variable data2 '"' <variable name n> '=' '"' variable datan '"'
  • "-->" is the closing identifier, a SSI token always ends with this.

SSI tokens may contain special tags (subtokens) which are dereferenced before evaluation of the SSI token takes place. Subtokens maybe inserted any place in the SSI token. Subtokens are especially useful when forming if, odbc, email, and exec tokens (described below) that are based on HTML form data returned from a remote client. The format of a subtoken is as follows: '&&'<subtokendata>'&&' where:

  • '&&' is a reserved character sequence defining the beginning and end of the subtoken
  • <subtokendata> is any value allowed in an echo token.

TOP


Should I use Server-Side Includes?

Only if necessary! Using Server-Side Includes requires more than normal system processes and should thus only be used when necessary. This includes having a Last Modified tag or a Textcounter on your website.

TOP


How do I implement Server-Side Includes on my account?

All documents containing at least one Server-Side Include must have the file extension .shtml. So if you add a SSI to your index.html page, be sure to rename this file to index.shtml in order for your SSI to work. Otherwise it is ignored.

Renaming your HTML documents is necessary so the server can parse through your document, find the SSI(s) and sent the appropriate information back to the client when these documents are requested.

TOP


What are all of the supported SSI tags?

The following is a list of all the supported SSI tags along with a description of each:

TAGS

MEANING

Echo provides for inserting the data of certain variables into an HTML page.
Include provides for inserting the contents of a file into the HTML page at the location of the include token.
Fsize provides for inserting the size of a given file into the HTML page at the location of the fsize token.
Flastmod provides for inserting the last modification date of a given file into the HTML page at the location of the flastmod token.
Exec provides for executing an external executable.
Config provides for setting certain HTML output options.
Odbc provides for querying and updating ODBC databases.
Email provides for sending an email whenever an HTML page is accessed or an HTML form is submitted.
If provides for conditional execution of SSI operations and conditional printing of HTML text based on logical comparisons.
Goto provides for jumping to a label token without executing any SSI code or printing* any HTML text between the goto token and label token.
Label provides a place for a goto or if goto token to jump to.
Break provides for termination of HTML documents at any point.

TOP


 

Home   Web Hosting   Web Design   Ecommerce   Support   Contact Us
Search   Site Map   Privacy   Acceptable Use   Terms & Conditions

Copyright © 2003 Studio Deluxe International. All rights reserved