Commit 234685c8 authored by Ken Coar's avatar Ken Coar
Browse files

Added documentation about use of {} in variable substitution.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@78156 13f79535-47bb-0310-9956-ffa450edef68
parent d8f7131c
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -288,6 +288,19 @@ elements are:
    <!--#if expr="$a = \$test" -->
</PRE>

<P> If a variable reference needs to be substituted in the middle of a
    string, it can be done by enclosing the reference in braces,
    <EM>&aacute; la</EM> shell substitution:

<PRE>
    &lt;!--#set var="Zed" value="${REMOTE_HOST}_${REQUEST_METHOD}" -->
</PRE>

<P> will result in the <SAMP>Zed</SAMP> variable being set to
    &quot;<SAMP>X_Y</SAMP>&quot; if <SAMP>REMOTE_HOST</SAMP> is
    &quot;<SAMP>X</SAMP>&quot; and <SAMP>REQUEST_METHOD</SAMP> is
    &quot;<SAMP>Y</SAMP>&quot;.

<P> EXAMPLE: the below example will print "in foo" if the DOCUMENT_URI is 
/foo/file.html, "in bar" if it is /bar/file.html and "in neither" 
otherwise: