Including from below Virtual Root

Results 1 to 3 of 3

Thread: Including from below Virtual Root

  1. #1
    Jason Miller Guest

    Default Including from below Virtual Root

    Setup: 3 sites are sharing VBScript on one server.<BR><BR>Anybody know of a simple way to directly include a file or few from directory X (below my virtual root), given a dynamic location/depth of the file calling the include (/status.asp, /projects/aardvark.asp, /x/y/z.asp)?<BR><BR>I came up with putting a one line &#060;!-- #include file="..\" --&#062; reference for each core file in each virtual root, but that seems a bit of a waste.<BR><BR>Thanks!

  2. #2
    Join Date
    Dec 1969

    Default RE: Including from below Virtual Root

    You need to use the .. like you have. Why does that seem like a waste? You can get yourself into some permissions issues using that method, but it is the only method to use to include folders outside of your web root directory.<BR><BR>You can learn more by reading this very thorough article on including articles:<BR><BR>The Low-Down on Include<BR><BR><BR>Happy Programming!

  3. #3
    Jason Miller Guest

    Default That's what I was afraid of...

    Thanks anyway.<BR><BR>Including a basic header (c:inetpubheader.asp) across X websites for every page:<BR><BR>File: /xyz/header.asp (on each website)<BR>&#060;!-- #include file="......header.asp" --&#062;<BR><BR>Every other file: (don&#039t forget your content)<BR>&#060;!-- #include virtual="/xyz/header.asp" --&#062;<BR><BR>Now you can put any file anywhere _and_ still include a write once, smite many (wosm?) header. I just wish I could include from the c: -- I mean, if MS is going to go for non-standard practices *anyway*...

Posting Permissions

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