summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Coar <coar@apache.org>1997-05-18 18:55:04 +0000
committerKen Coar <coar@apache.org>1997-05-18 18:55:04 +0000
commite688e16c6d0b8512150ac14ef2ce7843babeaa06 (patch)
tree6ba9b528170fa02d8c1760ccfb4ddccf30ec73d5
parent6d5bc60d5eac9a6ca61cc5dd3f27ef007d00e330 (diff)
downloadhttpd-e688e16c6d0b8512150ac14ef2ce7843babeaa06.tar.gz
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
-rw-r--r--docs/manual/mod/mod_include.html13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/manual/mod/mod_include.html b/docs/manual/mod/mod_include.html
index 51e3ede172..025643301a 100644
--- a/docs/manual/mod/mod_include.html
+++ b/docs/manual/mod/mod_include.html
@@ -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: