rbowen 02/01/20 06:43:56 Modified: htdocs/manual/mod mod_include.html Log: Formatting changes for better readability. Specific examples in the #exec cgi section. Anchor on the "include variables" section so that references to it don't seem quite so out of context. Revision Changes Path 1.38 +55 -33 httpd-docs-1.3/htdocs/manual/mod/mod_include.html Index: mod_include.html =================================================================== RCS file: /home/cvs/httpd-docs-1.3/htdocs/manual/mod/mod_include.html,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- mod_include.html 20 Jan 2002 02:41:08 -0000 1.37 +++ mod_include.html 20 Jan 2002 14:43:56 -0000 1.38 @@ -102,20 +102,20 @@ valid attributes are: <dl> - <dt>errmsg</dt> + <dt><strong>errmsg</strong></dt> <dd>The value is a message that is sent back to the client if an error occurs whilst parsing the document.</dd> - <dt>sizefmt</dt> + <dt><strong>sizefmt</strong></dt> <dd>The value sets the format to be used which displaying the size of a file. Valid values are <code>bytes</code> for a count in bytes, or <code>abbrev</code> for a count in Kb or Mb as appropriate.</dd> - <dt>timefmt</dt> + <dt><strong>timefmt</strong></dt> <dd>The value is a string to be used by the <code>strftime(3)</code> library routine when printing @@ -126,17 +126,18 @@ <dt><strong><a id="echo" name="echo">echo</a></strong></dt> <dd> - This command prints one of the include variables, defined + This command prints one of the <a href="#includevars">include + variables</a>, defined below. If the variable is unset, it is printed as <code>(none)</code>. Any dates printed are subject to the currently configured <code>timefmt</code>. Attributes: <dl> - <dt>var</dt> + <dt><strong>var</strong></dt> <dd>The value is the name of the variable to print.</dd> - <dt>encoding</dt> + <dt><strong>encoding</strong></dt> <dd>Specifies how Apache should encode special characters contained in the variable before outputting them. If set @@ -170,7 +171,7 @@ completely. The valid attributes are: <dl> - <dt>cgi</dt> + <dt><strong>cgi</strong></dt> <dd> The value specifies a (%-encoded) URL relative path to @@ -191,20 +192,32 @@ addition to the standard <a href="mod_cgi.html">CGI</a> environment.</p> + <p>For example:</p> + + <code><!--#exec cgi="/cgi-bin/example.cgi" --></code> + <p>If the script returns a Location: header instead of output, then this will be translated into an HTML anchor.</p> <p>The <code>include virtual</code> element should be - used in preference to <code>exec cgi</code>.</p> + used in preference to <code>exec cgi</code>. In particular, + if you need to pass additional arguments to a CGI program, + using the query string, this cannot be done with <code>exec + cgi</code>, but can be done with <code>include + virtual</code>, as shown here:</p> + + <code><!--#include virtual="/cgi-bin/example.cgi?argument=value" --></code> </dd> - <dt>cmd</dt> + <dt><strong>cmd</strong></dt> <dd> <p>The server will execute the given string using - <code>/bin/sh</code>. The include variables are available - to the command.</p> + <code>/bin/sh</code>. The <a + href="#includevars">include variables</a> are available + to the command, in addition to the usual set of CGI + variables.</p> <p>The use of <code>#include virtual</code> is almost always prefered to using either <code>#exec cgi</code> or <code>#exec @@ -233,12 +246,12 @@ Attributes: <dl> - <dt>file</dt> + <dt><strong>file</strong></dt> <dd>The value is a path relative to the directory containing the current document being parsed.</dd> - <dt>virtual</dt> + <dt><strong>virtual</strong></dt> <dd>The value is a (%-encoded) URL-path relative to the current document being parsed. If it does not begin with @@ -273,7 +286,7 @@ command. The valid attributes are:</p> <dl> - <dt>file</dt> + <dt><strong>file</strong></dt> <dd>The value is a path relative to the directory containing the current document being parsed. It cannot @@ -281,54 +294,63 @@ The <code>virtual</code> attribute should always be used in preference to this one.</dd> - <dt>virtual</dt> + <dt><strong>virtual</strong></dt> - <dd>The value is a (%-encoded) URL relative to the + <dd> + <p>The value is a (%-encoded) URL relative to the current document being parsed. The URL cannot contain a scheme or hostname, only a path and an optional query string. If it does not begin with a slash (/) then it is - taken to be relative to the current document.</dd> + taken to be relative to the current document.</p> + + <p>A URL is constructed from the attribute, and the output the + server would return if the URL were accessed by the client + is included in the parsed output. Thus included files can + be nested.</p> + </dd> </dl> - A URL is constructed from the attribute, and the output the - server would return if the URL were accessed by the client - is included in the parsed output. Thus included files can - be nested. </dd> <dt><strong>printenv</strong></dt> - <dd>This prints out a listing of all existing variables and + <dd> + <p>This prints out a listing of all existing variables and their values. Starting with Apache 1.3.12, special characters are entity encoded (see the <a href="#echo"><code>echo</code></a> element for details) - before being output. No attributes.</dd> - - <dd>For example: <code><!--#printenv --></code></dd> - - <dd>Apache 1.2 and above.</dd> + before being output. There are no attributes.</p> + <p>For example:</p> + + <p><code><!--#printenv --></code></p> + + <p>The <strong>printenv</strong> element is available only in + Apache 1.2 and above.</p> + </dd> <dt><strong>set</strong></dt> <dd> This sets the value of a variable. Attributes: <dl> - <dt>var</dt> + <dt><strong>var</strong></dt> <dd>The name of the variable to set.</dd> - <dt>value</dt> + <dt><strong>value</strong></dt> <dd>The value to give a variable.</dd> </dl> + <p> For example: <code><!--#set var="category" value="help" - --></code> - </dd> + --></code></p> - <dd>Apache 1.2 and above.</dd> + <p>The <strong>set</strong> element is available only in + Apache 1.2 and above.</p> + </dd> </dl> - <h2>Include Variables</h2> + <h2><a name="includevars">Include Variables</a></h2> In addition to the variables in the standard CGI environment, these are available for the <code>echo</code> command, for <code>if</code> and <code>elif</code>, and to any program
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]