From: Rich Bowen
SSI directives have the following syntax:
- <!--#element attribute=value attribute=value ... -->
+ <!--#function attribute=value attribute=value ... -->
It is formatted like an HTML comment, so if you don't have @@ -181,7 +181,7 @@ existing HTML documents.
configured, the directive will be replaced with its results. -The element can be one of a number of things, and we'll talk +
The function can be one of a number of things, and we'll talk some more about most of these in the next installment of this series. For now, here are some examples of what you can do with SSI
@@ -192,14 +192,14 @@ existing HTML documents. <!--#echo var="DATE_LOCAL" --> -The echo
element just spits out the value of a
+
The echo
function just spits out the value of a
variable. There are a number of standard variables, which
include the whole set of environment variables that are
available to CGI programs. Also, you can define your own
- variables with the set
element.
set
function.
If you don't like the format in which the date gets printed,
- you can use the config
element, with a
+ you can use the config
function, with a
timefmt
attribute, to modify that formatting.
@@ -214,7 +214,7 @@ existing HTML documents.
This element is also subject to timefmt
format
+
This function is also subject to timefmt
format
configurations.
include
SSI command. The include
- element can determine what file to include with either the
+ function can determine what file to include with either the
file
attribute, or the virtual
attribute. The file
attribute is a file path,
relative to the current directory. That means that it
@@ -315,7 +315,7 @@ modified?
If you want to change that message to something else, you
can do so with the errmsg
attribute to the
- config
element:
config
function:
<!--#config errmsg="[It appears that you don't know how to use SSI]" -->
I expect that I'll have an article some time in the coming
months about using SSI with small CGI programs. For now, here's
something else that you can do with the exec
- element. You can actually have SSI execute a command using the
+ function. You can actually have SSI execute a command using the
shell (/bin/sh
, to be precise - or the DOS shell,
if you're on Win32). The following, for example, will give you
a directory listing.