Export (0) Print
Expand All

IIS Server-Side Include Directives

IIS 6.0

You can use Server-Side Include (SSI) directives to perform certain tasks in static Web pages. Static Web pages execute slightly faster than Active Server Pages (ASP) pages on a large scale. With SSI directives, you can include the contents of a file in a Web page, include information about a file, include server variables, or include the output from executables, such as Common Gateway Interface (CGI files) and Internet Server API (ISAPI) applications.

With the exception of including executables, all of these tasks can be performed by using ASP scripting instead of SSI directives. With the exception of the #include directive, you cannot mix SSI directives with ASP script.

NoteNote:

The server-side time and date functions use the language set by the C-library locale rather than the operating system locale. The C-library locale is usually set to English.

Important noteImportant Note:

By default, files with the .shtm and .shtml extensions are normally bound to ssinc.dll, the SSI DLL. Mapping .htm and .html files to ssinc.dll will cause a performance degradation, as ssinc.dll must parse the entire file before it is sent. Unless your .htm and .html files actually use SSI directives, it is recommended that these extensions not be mapped to ssinc.dll. Instead, use the .shtm and .shtml extensions for content that requires SSI.

This topic contains the following sections:

  • #config: Specifies the string to be used for SSI error messages and the format to be used for dates and file sizes returned by the #flastmod and #fsize directives.

  • #echo: Inserts the value of a server variable into an HTML page.

  • #exec: Runs an application or a shell command and inserts the output into an HTML page.

  • #flastmod: Inserts the modification date of a file into a Web page, formatted by the #config directive.

  • #fsize: Inserts the size of a file into a Web page, formatted by the #config directive.

  • #include: Includes a file in a Web page. This is the only directive that can be used in ASP pages and STM pages.

Client: Requires Windows XP Professional, Windows 2000 Professional, or Windows NT Workstation 4.0.

Server: Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0.

Product: IIS

Show:
© 2014 Microsoft