From f6366ab8a6dd9e35f8f7db457600991d630f0560 Mon Sep 17 00:00:00 2001 From: Rich Bowen Date: Sat, 2 Mar 2002 16:40:41 +0000 Subject: [PATCH] Changed all the examples into . Changed a few notes to . Other minor cleanup. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93673 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/mod/mod_include.xml | 113 ++++++++++++++++++-------------- 1 file changed, 64 insertions(+), 49 deletions(-) diff --git a/docs/manual/mod/mod_include.xml b/docs/manual/mod/mod_include.xml index c124daa1bf..5bcfab5e2f 100644 --- a/docs/manual/mod/mod_include.xml +++ b/docs/manual/mod/mod_include.xml @@ -59,9 +59,9 @@ documents. text/x-server-parsed-html3 (and the resulting output will have the mime type text/html).

-

For more information, see our For more information, see our Tutorial on Server Side - Includes.

+ Includes.
@@ -114,11 +114,12 @@ documents.
echo
- This command prints one of the include - variables, defined - below. If the variable is unset, it is printed as - (none). Any dates printed are subject to the - currently configured timefmt. Attributes: +

This command prints one of the include + variables, defined below. If the variable is unset, it + is printed as (none). Any dates printed are + subject to the currently configured timefmt.

+ +

Attributes:

var
@@ -154,8 +155,8 @@ documents.
The exec command executes a given shell command or CGI - script. The IncludesNOEXEC Option disables this command + script. The IncludesNOEXEC Option disables this command completely. The valid attributes are:
@@ -169,9 +170,8 @@ documents. invoked as a CGI script, even if the server would not normally recognize it as such. However, the directory containing the script must be enabled for CGI scripts - (with ScriptAlias or - the ExecCGI Option). + (with ScriptAlias + or the ExecCGI Option).

The CGI script is given the PATH_INFO and query string (QUERY_STRING) of the original request from the @@ -182,7 +182,7 @@ documents.

For example:

- <!--#exec cgi="/cgi-bin/example.cgi" --> + <!--#exec cgi="/cgi-bin/example.cgi" -->

If the script returns a Location: header instead of output, then this will be translated into an HTML @@ -196,7 +196,10 @@ documents. cgi, but can be done with include virtual, as shown here:

- <!--#include virtual="/cgi-bin/example.cgi?argument=value" --> + + <!--#include virtual="/cgi-bin/example.cgi?argument=value" --> + +
cmd
@@ -222,7 +225,9 @@ documents. non-suexec configuration on unix, it will not produce the desired result under Win32, or when running suexec:

- <!--#exec cmd="perl /path/to/perlscript arg1 arg2" --> + + <!--#exec cmd="perl /path/to/perlscript arg1 arg2" --> +
@@ -306,7 +311,9 @@ documents. in the parsed file. You may include a query string in a CGI url:

- <!--#include virtual="/cgi-bin/example.cgi?argument=value" --> + + <!--#include virtual="/cgi-bin/example.cgi?argument=value" --> +

include virtual should be used in preference to exec cgi to include the output of CGI @@ -326,7 +333,9 @@ documents.

For example:

-

<!--#printenv -->

+ + <!--#printenv --> +

The printenv element is available only in Apache 1.2 and above.

@@ -345,9 +354,11 @@ documents.
The value to give a variable.
-

- For example: <!--#set var="category" value="help" - -->

+

For example:

+ + + <!--#set var="category" value="help" --> +

The set element is available only in Apache 1.2 and above.

@@ -401,18 +412,19 @@ documents. as the arguments to conditional operators. You can insert a literal dollar sign into the string using backslash quoting:

-
+
     <!--#if expr="$a = \$test" -->
-
+

If a variable reference needs to be substituted in the middle of a character sequence that might otherwise be considered a valid identifier in its own right, it can be disambiguated by enclosing the reference in braces, a la shell substitution:

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

This will result in the Zed variable being set to "X_Y" if REMOTE_HOST is @@ -422,15 +434,16 @@ documents.

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:

-
-    <!--#if expr="\"$DOCUMENT_URI\" = \"/foo/file.html\"" -->
-    in foo
-    <!--#elif expr="\"$DOCUMENT_URI\" = \"/bar/file.html\"" -->
-    in bar
-    <!--#else -->
-    in neither
+
+
+    <!--#if expr="\"$DOCUMENT_URI\" = \"/foo/file.html\"" -->
+ in foo
+ <!--#elif expr="\"$DOCUMENT_URI\" = \"/bar/file.html\"" -->
+ in bar
+ <!--#else -->
+ in neither
<!--#endif --> -
+
@@ -438,12 +451,13 @@ documents. These are available in Apache 1.2 and above. The basic flow control elements are: -
-    <!--#if expr="test_condition" -->
-    <!--#elif expr="test_condition" -->
-    <!--#else -->
+
+
+    <!--#if expr="test_condition" -->
+ <!--#elif expr="test_condition" -->
+ <!--#else -->
<!--#endif --> -
+

The if element works like an if statement in a programming language. The test condition is @@ -503,10 +517,11 @@ documents.

"=" and "!=" bind more tightly than "&&" and "||". "!" binds most tightly. Thus, the following are equivalent:

-
-    <!--#if expr="$a = test1 && $b = test2" -->
+
+
+    <!--#if expr="$a = test1 && $b = test2" -->
<!--#if expr="($a = test1) && ($b = test2)" --> -
+

Anything that's not recognized as a variable or an operator is treated as a string. Strings can also be quoted: @@ -514,10 +529,11 @@ documents. (blanks and tabs) because it is used to separate tokens such as variables. If multiple strings are found in a row, they are concatenated using blanks. So,

-
-     string1    string2  results in string1 string2
-    'string1    string2' results in string1    string2
-
+ + +
string1    string2  results in string1 string2
+
'string1    string2' results in string1    string2
+
@@ -532,13 +548,12 @@ documents.

Files processed for server-side includes no longer accept requests with PATH_INFO (trailing pathname information) by - default. You can use the AcceptPathInfo directive to + default. You can use the AcceptPathInfo directive to configure the server to accept requests with PATH_INFO.

- SSIEndTag Changes the string that mod_include looks for to end an @@ -680,11 +695,11 @@ bit set this bit allows clients and proxies to cache the result of the request. -

Note: you would not want to use the full + Note: you would not want to use the full option, unless you assure the group-execute bit is unset for every SSI script which might #include a CGI or otherwise produces different output on each hit (or could - potentially change on subsequent requests).

+ potentially change on subsequent requests). -- 2.40.0