About Server-Side Includes

You use server-side include (SSI) directives to include text, graphics, or application information into an HTML page just before sending the HTML page to a user. SSI can be used to include, for example, a time/date stamp, a copyright notice, or a form for a customer to fill out and return. Including a file is an easy way to incorporate text or graphics that is repeated in many files. Rather than typing the information into every file, you use a simple statement that instructs the Web server to read in the file.

Because a file containing SSI directives requires special processing, you must give any SSI files an SSI file name extension. The default extensions are .stm, .shtm, and .shtml. You can add additional extensions to the list recognized by the Web server; see Setting Application Mappings.

The Web server processes SSI directives while it is processes the HTML page. When it reaches an SSI directive, it inserts the contents of the included file directly into the HTML page. If the included file in turn contains an SSI directive, that file is also inserted.

In addition to the basic directive used to include a file, you can use SSI directives to insert information about a file (such as its size) or to run an application or a shell command.


© 1997 by Microsoft Corporation. All rights reserved.