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 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Jul 2002
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    #INCLUDEing an absolute pathname??

    I feel like a boob, but how do I get a number of websites on a single server to share a common library of asp files? I've tried every variation on #INCLUDE I can find reference to, but to no avail.

    What I'd most like to be able to do is simply #INCLUDE an actual disk pathname, e.g.:


    <!-- #INCLUDE FILE = "C:\MyASPLib\includethis.asp" -->

    But this always gives me the error that the file cannot be found, even though I can confirm that the path is correct.

    Is anything like this possible?

    thanks.

    Jeff
    Last edited by Composer; 08-19-2002 at 12:53 AM.

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Put the "common" library of include files into a directory under the root and name it something like "includes". Then use <!--#include virtual="/includes/NameOfFileGoesHere"-->.

    You also must turn on the "Enable Parent Paths" option in the cofiguration for the ASP application.

  • #3
    New to the CF scene
    Join Date
    Jul 2002
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Your suggestion of course works for a single website -- but the others, which reside in other directories on the drive, cannot access the files in this way.

    Is there really no way to do this ??

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by Composer
    Your suggestion of course works for a single website -- but the others, which reside in other directories on the drive, cannot access the files in this way.

    Is there really no way to do this ??
    I see I didn't quite understand your original question but there is indeed a simple answer:

    Set up a virtual directory on each of the web sites that point to the single location for your include files. Using the virtual path in your include statements, the files will be found (I know that'll work because I'm doing exactly that on a server I manage).

  • #5
    New to the CF scene
    Join Date
    Jul 2002
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks Roy -- that's what I was looking for!

  • #6
    New to the CF scene
    Join Date
    May 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i've a site working on windows 2003, u know that u've to work with the virtual path, it's works well on windows2003, but it doesn't at windows xp that i work on at home, i remove the parental path put it still doesnt work

    any body help

  • #7
    New to the CF scene
    Join Date
    May 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You also must turn on the "Enable Parent Paths" option in the cofiguration for the ASP application.
    Hmm that's why I'm getting

    "The Include file '..\includes\connexion_bd.asp' cannot contain '..' to indicate the parent directory. "

    What do you mean by configuration of the ASP application ('cause I don't think, I have the right on this here and I would like to indicate to the administrator where to change this) ?


  •  

    Posting Permissions

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