Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jan 2003
    Posts
    111
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question how does conditional ssi work?

    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 '

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?
    Last edited by brothercake; 04-25-2003 at 01:54 AM.
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #3
    Regular Coder Feyd's Avatar
    Join Date
    May 2002
    Location
    Los Angeles, CA Maxim: Subvert Society
    Posts
    403
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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).
    Moderator, Perl/CGI Forum
    shadowstorm.net - subvert society

  • #4
    Regular Coder
    Join Date
    Jan 2003
    Posts
    111
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Thanks feyd I'll check into server status.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •