Note: The operating system configuration determines the full and abbreviated
month names and years.
Use the echo directive to display the value for specified environment variables
using the var tag. If a variable is not found, a (None) is displayed. In addition to
the standard Common Gateway Interface (CGI) variables, you can also display the
following environment variables:
DATE_GMT
The current date and time in Greenwich Mean Time. The config timefmt
directive defines the formatting of this variable.
DATE_LOCAL
The current date and local time. The formatting of this variable is defined
using the config timefmt directive.
DOCUMENT_NAME
This is the name of the topmost document. If the HTML was generated by
CGI, this contains the name of the CGI.
DOCUMENT_URI
The full URL the client entered, without the query string.
LAST_MODIFIED
The current data and time that the current document was last changed.
The config timefmt directive defines the formatting of this variable.
QUERY_STRING_UNESCAPED
The search query sent by the client. This is undefined unless the HTML
was generated by a CGI program.
SSI_DIR
The path of the current file relative to SSI_ROOT. If the current file is in
SSI_ROOT, this value is /.
SSI_FILE
The file name of the current file.
SSI_INCLUDE
The value used in the include command that retrieved this file. This is not
defined for the topmost file.
SSI_PARENT
The path and file name of the includer, relative to SSI_ROOT.
SSI_ROOT
The path of the topmost file. All include requests must be in this directory
or a child of this directory.
Example:
<!--#echo var=SSI_DIR -->
Note: You can use echo to display a value set by the set or global
directives.
You can use the exec directive to include the output of a CGI program. The Exec
directive discards any HTTP headers CGI outputs except for:
content-type
determines whether to parse the body of the output for other Includes.
content-encoding
determines if EBCDIC to ASCII translation must be performed.
Chapter9. Using Server-Side Includes 135