From: Ken Coar Date: Sun, 18 May 1997 18:55:04 +0000 (+0000) Subject: Added documentation about use of {} in variable substitution. X-Git-Tag: APACHE_1_2b11~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e688e16c6d0b8512150ac14ef2ce7843babeaa06;p=thirdparty%2Fapache%2Fhttpd.git 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 --- diff --git a/docs/manual/mod/mod_include.html b/docs/manual/mod/mod_include.html index 51e3ede1720..025643301a7 100644 --- a/docs/manual/mod/mod_include.html +++ b/docs/manual/mod/mod_include.html @@ -288,6 +288,19 @@ elements are: <!--#if expr="$a = \$test" --> +

If a variable reference needs to be substituted in the middle of a + string, it can be done by enclosing the reference in braces, + á la shell substitution: + +

+    <!--#set var="Zed" value="${REMOTE_HOST}_${REQUEST_METHOD}" -->
+
+ +

will result in the Zed variable being set to + "X_Y" if REMOTE_HOST is + "X" and REQUEST_METHOD is + "Y". +

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: