]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Added documentation about use of {} in variable substitution.
authorKen Coar <coar@apache.org>
Sun, 18 May 1997 18:55:04 +0000 (18:55 +0000)
committerKen Coar <coar@apache.org>
Sun, 18 May 1997 18:55:04 +0000 (18:55 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@78156 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_include.html

index 51e3ede1720c68d57037e61221547ca7e97771ae..025643301a75081619ddd3cb616bab6f1d0b2e63 100644 (file)
@@ -288,6 +288,19 @@ elements are:
     &lt;!--#if expr="$a = \$test" --&gt;
 </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: