UBB.Dev
Posted By: The Team Advanced SSI - 06/03/2001 1:43 AM
NOTE:

In order to use Server Side Includes, your server must be configured to support them. Check with your system administrator as to whether or not you can use them, and if so, what restrictions may be placed on them. If you are not allowed to do SSI- consider moving to someplace where you can!

WHAT IS SSI?

Server Side Includes (SSI) are commands executed by the server as it parses (chops up and looks for special instructions) the HTML file. SSI can be used to include the value of various server environment variables within your HTML such as the local date and time, to add in a footer or header, or embed an executable script. HTML files which contain SSI are often named *.shtml or *.shtm.

Here is basically what happens when your server handles a request for an SSI document:

The server reads the document and parses it for directives (another word for directions). It then follows the instructions that it finds and merges their results into creating a finished document. The document is then sent to the client browser.

If you are really concerned about presenting dynamic content in a uniform manner across most browsers, this method is preferred over "client-side scripting" such as javascript, where there are great variations in how differnt browsers handle the same coding.

Examples:

- Including a file size on a page
Simple use of SSI to include the size of a file on a page.


- Label
Labels specific files:


- Executing a Command
To use SSI to execute a command on the document use the following.


This will execute the specified command.

- ODBC Connect
This connects to a remote (SQL, Oracle) database.


- Go to Command
Easy goto command (redirect type thing)


- Break line
Terminates HTML document.


- Last update
Tells when a file was last updated.


- ODBC Debug
Debugs an ODBC database



Warning:

Improper use of SSI may impair server performance as well as server security. Consult with your server administrator before executing Server Side Includes.
© UBB.Developers