SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Guru coiL's Avatar
    Join Date
    Sep 2001
    Location
    QLD, Australia
    Posts
    666
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    SSI virtual or file ?

    Hi, first sorry if this is in the wrong place

    Was wondering if I should be using
    <!--#include virtual="../filename.html"--> or
    <!--#include file="../filename.html"-->

    and what the difference between them are. I have a site on a netfirms account and I had to use virtual= to get files in a sub folder to show the icluded pages. Though I can use file= for pages that are in the same folder as the pages I want to include....
    coiL
    "cradled in the learning curve"

  2. #2
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have always seen it used as <!--#include virtual="../filename.html"-->, though I use PHP for all of my include()s.

    -Colin

  3. #3
    Gone!
    Join Date
    Aug 2001
    Location
    Witty Location Parody
    Posts
    3,889
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Creole
    http://www.stars.com/Authoring/SSI/Intro/include.html

    An excerpt from this page:
    file gives a pathname relative to the current directory. ../ cannot be used in this pathname, nor can absolute paths be used.

    and

    virtual gives a virtual path to a document on the server.

    So, basically, if you are trying to use file to go UP a directory it won't work. File starts from the current directory and ONLY allows you to go deeper.

    Virtual, on the other hand, starts from the servers root meaning that you could go all the way to / and go down into another directory.
    HtH

    G

  4. #4
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Glen. I'm not able to correctly view your link due to a 404 error, however, that clears things up a bit.

    -Colin

  5. #5
    Gone!
    Join Date
    Aug 2001
    Location
    Witty Location Parody
    Posts
    3,889
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Aes
    Thanks Glen. I'm not able to correctly view your link due to a 404 error, however, that clears things up a bit.

    -Colin
    Sorry about that, its a link from a quote from one of Creoles posts which has been automatically closed as the thread is ages old now, so the link is probably out of date.

    However about 3/4's down the page in this link gives another specification.

    http://www.bu.edu/webcentral/learnin...aver3/ssi.html

    Glen

  6. #6
    SitePoint Guru coiL's Avatar
    Join Date
    Sep 2001
    Location
    QLD, Australia
    Posts
    666
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks that does clear it up
    coiL
    "cradled in the learning curve"


Bookmarks

Posting Permissions

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