All SSI directives have the format:
<!--#command parameter(s)="argument"-->
Each of the symbols is important; be careful not to forget the pound sign (#).
Following is a list of the primary Server Side Includes, the parameters they take, and what they do.
Inserts value of special SSI variables, as well as other environment variables. For example:
<H1>Welcome to my server at <!--#echo var="SERVER_NAME"-->...</H1>
See also Chapter 11, CGI Environment Variables, and "SSI Environment Variables" later in the current chapter.
Inserts text of document into current file.
Pathname relative to a document on the server.
Virtual path to a document on the server.
Inserts the size of a specified file.
The size of the file is <!--#fsize file="/mybook.ps"--> bytes.
Inserts the last modification date and time for a specified file.
The file was last modified on <!--#flastmod file="/mybook.ps"-->bytes.
You can specify the format of the date and time returned using the config directive with the timefmt argument; timefmt takes a wide range of values described in the section "Configurable Time Formats For SSI Output" later in this chapter.
Executes external programs and inserts output in the current document.
Any application on the host.
CGI program.
For example:
<!--#exec cmd="/bin/finger $REMOTE_USER@$REMOTE_HOST"--> This page has been accessed <!--#exec cgi="/cgi-bin/counter.pl"--> times.
Modifies various aspects of SSI.
Default error message.
<!--#config errmsg="Error: File not found"-->
Format for the size of the file (returned by the fsize directive). Acceptable values for sizefmt are bytes, or abbrev, which rounds the file size to the nearest kilobyte. For example:
<!--#config sizefmt="abbrev"-->
Format for times and dates. SSI offers a wide range of formats. See the section "Configurable Time Formats For SSI Output" later in this chapter.
This HTML Help has been published using the chm2web software. |