Page

I.5.1- SSI Directives, Attributes and Tokens

Created by Brendan Doss.
Last Updated by Sarah Welna.  

PublicCategorized as Appendix I.

Not yet tagged
<< I.5.0- Server-Side Include Directives and UtilitiesAppendixII.5.2- Command Type Attributes for the #exec Directive >>

SSI Directives, Attributes and Tokens

Directive

Description

#include

Inserts the contents of a specified file into the response stream being sent to the client, replacing the directive. For example:

<!-- #include FILE="usefulbits.inc" -->

See below for a list of the attributes and tokens that can be used in this directive.

 

Directive

Description

#config

Specifies the format that will be used for dates, times and file sizes, and the text of the generic SSI error message that is returned to the client. For example:

<!-- #config ERRMSG="SSI Processing Error" -->

<!-- #config TIMEFMT ="%A, %B %d %Y %H:%M:%S" -->

<!-- #config SIZEFMT ="BYTES" -->

See below for a list of the attributes and tokens that can be used in this directive.

#echo

Inserts the value of an HTTP environment variable into the response stream being sent to the client, replacing the directive. For example:

<!-- #echo VAR="SERVER_NAME" -->

See below for a list of the attributes and tokens that can be used in this directive.

#exec

Executes a program or a shell command on the server. For example:

<!-- #exec CGI="/scripts/myapp.exe?value1=this&value2=that" -->

<!-- #exec CMD="cmd.exe /C iisrestart /stop" -->

<!-- #exec CMD="cmd.exe /C net start cisvc" -->

See below for a list of the attributes and tokens that can be used in this directive.

You must add the following entry to the Windows Registry to be able to use the CMD attribute:

HKEY_LOCAL_MACHINE

\SYSTEM

\CurrentControlSet

\Services

\W3SVC

\Parameters

\SSIEnableCmdDirective

 

Set the value to 1 to and restart the WWW service allow the CMD attribute to be used in the #exec directive. Set it to 0 to disable it and prevent unauthorized use, which could otherwise damage the server installation.


Directive

Description

#flastmod

Inserts the date and time that a specified file was last modified into the response stream being sent to the client, replacing the directive. For example:

<!-- #flastmod FILE="Default.asp" -->

See below for a list of the attributes and tokens that can be used in this directive.

#fsize

Inserts the size of a specified file into the response stream being sent to the client, replacing the directive. For example:

<!-- #fsize FILE="Default.asp" -->

See below for a list of the attributes and tokens that can be used in this directive.

<< I.5.0- Server-Side Include Directives and UtilitiesAppendixII.5.2- Command Type Attributes for the #exec Directive >>

Copyright © 2003 by Wiley Publishing, Inc.

Powered by Near-TimeTerms of Services | Privacy Policy | Security Policy |