Received: (from majordom@localhost) by hyperreal.com (8.8.5/8.8.5) id LAA03132; Sun, 18 May 1997 11:55:07 -0700 (PDT) Received: (from coar@localhost) by hyperreal.com (8.8.5/8.8.5) id LAA03123 for apache-cvs; Sun, 18 May 1997 11:55:05 -0700 (PDT) Date: Sun, 18 May 1997 11:55:05 -0700 (PDT) From: Rodent of Unusual Size Message-Id: <199705181855.LAA03123@hyperreal.com> To: apache-cvs@hyperreal.com Subject: cvs commit: apache/htdocs/manual/mod mod_include.html Sender: apache-cvs-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org coar 97/05/18 11:55:05 Modified: htdocs/manual/mod mod_include.html Log: Added documentation about use of {} in variable substitution. Revision Changes Path 1.11 +13 -0 apache/htdocs/manual/mod/mod_include.html Index: mod_include.html =================================================================== RCS file: /export/home/cvs/apache/htdocs/manual/mod/mod_include.html,v retrieving revision 1.10 retrieving revision 1.11 diff -C3 -r1.10 -r1.11 *** mod_include.html 1997/05/01 05:26:58 1.10 --- mod_include.html 1997/05/18 18:55:04 1.11 *************** *** 288,293 **** --- 288,306 ---- <!--#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: