home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 35 Internet
/
35-Internet.zip
/
srev13h.zip
/
iftest.sht
< prev
next >
Wrap
Text File
|
1999-06-01
|
2KB
|
85 lines
<!DOCTYPE HTML PUBLIC "-//W3 Organization//DTD W3 HTML 2.0//EN">
<html>
<head>
<title>Test of #IF</title>
</head>
<body>
<h1>Test of #IF</h1>
This document contains a simple demonstration of the <code>#IF</code>
<em>XSSI</em> conditional server side include.
<p>
<!-- You can change these set variables to change what is included -->
<!-- #set var="FOOBAR" value="sample" -->
<!-- #set var="BARFOO" value="2" -->
<!-- #set var="FOO" value="A" -->
<!-- #set var="BAR" value="B" -->
<b>Note:</b> the following #SET variables are equal to:<ul>
<li><TT>FOOBAR = </tt> <!-- #echo var="FOOBAR" -->
<li><TT>BARFOO = </tt> <!-- #echo var="BARFOO" -->
<li><TT>FOO = </tt> <!-- #echo var="FOO" -->
<li><TT>BAR = </tt> <!-- #echo var="BAR" -->
</ul>
<hr width="30%"><center>Begin the the test ....</centeR> <hr width="30%">
<!-- #IF expr="(\"$FOOBAR\"=\"HELP\")" -->
Help Mode
<!-- #elif expr="$FOOBAR=SAMPLE" -->
Samples:
<!-- #if expr="$BARFOO=1" -->
mode 1 ,
<!-- #elif expr="$BARFOO=2" -->
mode 2 ,
<!-- #if expr="$FOO=A" -->
submode A
<!-- #else -->
no submode
<!-- #endif -->
<!-- #elif expr="$BARFOO=3" -->
mode 3
<!-- #else -->
Default
<!-- #endif -->
<!-- #else -->
Default mode :
<!-- #if expr="$FOO=A" -->
submode A of default mode
<!-- #else -->
normal default mode
<!-- #endif -->
<!-- #if expr="$BAR=B" -->
: submode2 B of default mode
<!-- #endif -->
<!-- #endif -->
<p>
<ul>
<li>$bar != $foo :
<!-- #if expr="$bar != $foo" -->
true
<!-- #else -->
false
<!-- #endif -->
<li> ($foo="A") && ($bar != "B"):
<!-- #if expr=" ($foo=\"A\") && ($bar !=\"B\")" -->
true
<!-- #else -->
false
<!-- #endif -->
</ul>
That's all.
</body>
</html>