SSI Commands

The following section describes the primary Server Side Includes and their respective attributes.

config

config errmsg|sizefmt|timefmt="string"

Controls various aspects of SSI.

Attributes

Example



<!-- #config errmsg="Error: File not found" -->
<!-- #config sizefmt="abbrev" -->


echo

echo var="environment or set variable"

Prints (displays in the document) the value of the variable. For an list of available variables, see "Include Variables" later in this chapter.

Attributes

Example



<! -- #echo var="DATE_GMT" -- >


exec

exec cmd|cgi="string"

Executes an external program and inserts the output in the current document.

Attributes

Example



You are visitor number <! -- #exec cgi="/cgi-bin/counter.pl" -- >
<!--#exec cmd="/bin/finger $REMOTE_USER@$REMOTE_HOST" -->


fsize

fsize file|virtual="path"

Inserts the file size of a specified file. The size follows the sizefmt format configuration.

Attributes

Example



The size of this file is <!--#fsize file="thisfile.html" -->


flastmod

flastmod file|virtual="path"

Inserts the last modification date of a specified file. The date follows the timefmt format configuration.

Attributes

Example



That file was last modified on <!--#flastmod virtual="/mydocs/thatfile.html" -->


include

include file|virtual ="path"

Inserts the contents of another document or file into the parsed file.

Attributes

printenv

printenv

Prints out a listing of all existing variables and their values.

Example



<! -- #printenv -- >


set

set

Sets the value of a variable.

Attributes

Example



<!--#set var="password" value="mustard" -->