From: Rich Bowen mod_include
- documentation. Here are some examples of how one might use this
- construct.
For example, if you wish to customize the text on your web page + based on the time of day, you could use the following recipe, placed + in the HTML page:
-In your configuration file, you could put the following - line:
-BrowserMatchNoCase macintosh Mac- - -
- BrowserMatchNoCase MSIE InternetExplorer
This will set environment variables ``Mac'' and - ``InternetExplorer'' to true, if the client is running Internet - Explorer on a Macintosh.
- -Then, in your SSI-enabled document, you might do the - following:
-
- <!--#if expr="-T reqenv('Mac') &&
- -T reqenv('InternetExplorer')" -->
- Apologetic text goes here
- <!--#else -->
- Cool JavaScript code goes here
- <!--#endif -->
-
+ Good
+ <!--#if expr="%{TIME_HOUR} >=12" -->
+ morning!
+ <!--#else -->
+ afternoon!
+ <!--#endif -->
+
Any other variable (either ones that you define, or normal environment variables) can be used in conditional statements. - With Apache's ability to set environment variables with the + See Expressions in Apache HTTP Server for + more information on the expression evaluation engine.
+ +With Apache's ability to set environment variables with the
SetEnvIf
directives, and other related directives,
- this functionality can let you do some pretty involved dynamic
- stuff without ever resorting to CGI.
Les SSI permettent d'ajouter du contenu dynamique à des documents HTML préexistants.
diff --git a/docs/manual/howto/ssi.xml.fr b/docs/manual/howto/ssi.xml.fr index 41055386a6..68b97a6c8f 100644 --- a/docs/manual/howto/ssi.xml.fr +++ b/docs/manual/howto/ssi.xml.fr @@ -1,7 +1,7 @@ - + diff --git a/docs/manual/howto/ssi.xml.ja b/docs/manual/howto/ssi.xml.ja index 1b63b1c87d..4d59e66ccc 100644 --- a/docs/manual/howto/ssi.xml.ja +++ b/docs/manual/howto/ssi.xml.ja @@ -1,7 +1,7 @@ - + +