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 6 of 6
  1. #1
    New Coder
    Join Date
    Jul 2002
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question on nesting SSI directives

    Can anyone tell me how to nest SSI directives, such as including the value of a query string inside of an include directive?

  • #2
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What server side language are you using?

  • #3
    New Coder
    Join Date
    Jul 2002
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I was just talking about simple (X)SSI. I found out that it could be done with with <!--#include virtual="dir/$QUERY_STRING.ext" -->. Haven't been able to figure out how to include one directive inside another though.

  • #4
    Regular Coder Feyd's Avatar
    Join Date
    May 2002
    Location
    Los Angeles, CA Maxim: Subvert Society
    Posts
    404
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Your use of 'include one directive inside of another' seems a little confusing...what specifically are you trying to do?

    Can you accomplish it by using xSSI if-elif-else statements?

    Take a look around here: http://www.uic.edu/depts/scailab/system/tutorial.shtml
    Moderator, Perl/CGI Forum
    shadowstorm.net - subvert society

  • #5
    New Coder
    Join Date
    Jul 2002
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Basically I was just trying to get the query string from a URL and add that value to the attribute in an include directive. As I said I found a satisfactory solution for now, but before I was wondering if it would be possible to do something like <!--#include virtual="dir/<!--#echo var="QUERY_STRING" -->" --> That didn't work though, and all I was just wondering if something like that was possible.

  • #6
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i was asking what language you are using cause in ASP, it's not possible since the parcing starts with including the SSI's code before checking the control of flow (if -then-else-end if etc), and then just starts with parsing the actual code. So a dynamic filename where you need to get a value from the querystring isn't possible in ASP) I assume the same goes for other server side languages, but i'm not sure.


  •  

    Posting Permissions

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