@@ -443,37 +443,30 @@ modified?</title>
443
443
the ``truth'' of a particular value. (A given string is true if
444
444
it is nonempty.) For a full list of the comparison operators
445
445
available to you, see the <module >mod_include</module >
446
- documentation. Here are some examples of how one might use this
447
- construct.</p >
446
+ documentation.</p >
447
+
448
+ <p >For example, if you wish to customize the text on your web page
449
+ based on the time of day, you could use the following recipe, placed
450
+ in the HTML page:</p >
448
451
449
- <p >In your configuration file, you could put the following
450
- line:</p >
451
- <highlight language =" config" >
452
- BrowserMatchNoCase macintosh Mac<br />
453
- BrowserMatchNoCase MSIE InternetExplorer
454
- </highlight >
455
-
456
- <p >This will set environment variables ``Mac'' and
457
- ``InternetExplorer'' to true, if the client is running Internet
458
- Explorer on a Macintosh.</p >
459
-
460
- <p >Then, in your SSI-enabled document, you might do the
461
- following:</p >
462
- <example >
463
- < !--#if expr="-T reqenv('Mac') &&
464
- -T reqenv('InternetExplorer')" --> <br />
465
- Apologetic text goes here<br />
466
- < !--#else --> <br />
467
- Cool JavaScript code goes here<br />
468
- < !--#endif -->
469
- </example >
452
+ <example >
453
+ Good
454
+ < !--#if expr="%{TIME_HOUR} > =12" --> <br />
455
+ morning!<br />
456
+ < !--#else --> <br />
457
+ afternoon!<br />
458
+ < !--#endif --> <br />
459
+ </example >
470
460
471
461
<p >Any other variable (either ones that you define, or normal
472
462
environment variables) can be used in conditional statements.
473
- With Apache's ability to set environment variables with the
463
+ See <a href =" ../expr.html" >Expressions in Apache HTTP Server</a > for
464
+ more information on the expression evaluation engine.</p >
465
+
466
+ <p >With Apache's ability to set environment variables with the
474
467
<code >SetEnvIf</code > directives, and other related directives,
475
- this functionality can let you do some pretty involved dynamic
476
- stuff without ever resorting to CGI .</p >
468
+ this functionality can let you do a wide variety of dynamic content
469
+ on the server side without resorting a full web application .</p >
477
470
</section >
478
471
</section >
479
472
0 commit comments