These are available for the <code>echo</code> command, and to any program
invoked by the document.
In addition to the variables in the standard CGI environment, these are available for the <code>echo</code> command, for <code>if</code> and <code>elif</code>, and to any program invoked by the document.
<dl>
<dt>DATE_GMT
<dd>The current date in Greenwich Mean Time.
@@ -164,6 +183,83 @@ current document.
</dl>
<p>
<H2>Flow Control Elements</H2>
These are available in Apache 1.2 and above. The basic flow control
elements are:
<PRE>
<!--#if expr="<I>test_condition</I>" -->
<!--#elif expr="<I>test_condition</I>" -->
<!--#else -->
<!--#endif -->
</PRE>
<P> The <B><CODE>if</CODE></B> element works like an
if statement in a programming language. The test condition
is evaluated and if the result is true, then the text until
the next <B><CODE>elif</CODE></B>, <B><CODE>else</CODE></B>.
or <B><CODE>endif</CODE></B> element is included in the
output stream.
<P> The <B><CODE>elif</CODE></B> or <B><CODE>else</CODE></B>
statements are be used the put text into the output stream
if the original test_condition was false. These elements
are optional.
<P> The <B><CODE>endif</CODE></B> element ends the
<B><CODE>if</CODE></B> element and is required.
<P><I>test_condition</I> is one of the following:
<DL>
<DT><I>string</I><DD>true if <I>string</I> is not empty
<DT><I>string1</I> = <I>string2</I><BR>
<I>string1</I> != <I>string2</I>
<DD>Compare string1 with string 2. If string2 has the form <I>/string/</I>
than it is compared as a regular expression.
Regular expressions have the same syntax as those found in the
Unix egrep command.
<DT>( <I>test_condition</I> )<DD>true if <I>test_condition</I> is true
<DT>! <I>test_condition</I><DD>true if <I>test_condition</I> is false
<I>test_condition1</I> and <I>test_condition2</I> are true
<DT><I>test_condition1</I>&&<I>test_condition2</I><DD>true if both
<I>test_condition1</I> and <I>test_condition2</I> are true
<DT><I>test_condition1</I> || <I>test_condition2</I><DD>true if either
<I>test_condition1</I> or <I>test_condition2</I> is true
</DL>
<P> "<I>=</I>" and "</I>!=</I>" bind more tightly than "<I>&&</I>" and "<I>||</I>".
"<I>!</I>" binds most tightly. Thus, the following are equivalent: