View Full Version : how does conditional ssi work?

04-25-2003, 01:27 AM
I see the coding for conditional ssi but when I try the code I get errors saying the tags are unknown. What am I missing here?

Here is what code I used:
<!--#config timefmt="%A"-->
<!--#if expr="$DATE_LOCAL = /Monday/" -->
<p>I hate mondays!</p>
<!--#elif expr="$DATE_LOCAL = /Friday/" -->
<p>Yeeah, it's Friday!</p>
<!--#else -->
<p>No comment!</p>
<!--#endif -->

This was the resulting page in a browser:
SSI error: Unknown tag 'if expr="$DATE_LOCAL = /Monday/" '
I hate mondays!

SSI error: Unknown tag 'elif expr="$DATE_LOCAL = /Friday/" '
Yeeah, it's Friday!

SSI error: Unknown tag 'else '
No comment!

SSI error: Unknown tag 'endif '

04-25-2003, 01:47 AM
Will you please stop multi-posting - this is the third time you've posted this question. I'm gonna delete the one in JS programming, so this is the only active one left.

As to your question - that works fine for me; maybe your server is configured differently in some way?

04-25-2003, 09:26 PM
Basic considerations. Do you have SSI enabled? Are your pages named with a .shtml extension? Your host could have certain SSI attributes disabled...or perhaps you are not on a Apache host and are using NT? If so, you can't truly do XSSI on NT, you can do basic SSI (include, exec, etc.). That code does look fine, so look elsewhere for your problems (server configurations or page naming conventions are the most likely).

04-27-2003, 10:03 AM
Thanks feyd I'll check into server status.