Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-18-2002, 11:37 PM   PM User | #1
Composer
New to the CF scene

 
Join Date: Jul 2002
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Composer is an unknown quantity at this point
#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-18-2002 at 11:53 PM..
Composer is offline   Reply With Quote
Old 08-19-2002, 06:25 AM   PM User | #2
Roy Sinclair
Senior Coder

 
Join Date: Jun 2002
Location: Wichita
Posts: 3,880
Thanks: 0
Thanked 0 Times in 0 Posts
Roy Sinclair will become famous soon enough
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.
Roy Sinclair is offline   Reply With Quote
Old 08-19-2002, 02:07 PM   PM User | #3
Composer
New to the CF scene

 
Join Date: Jul 2002
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Composer is an unknown quantity at this point
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 ??
Composer is offline   Reply With Quote
Old 08-19-2002, 02:42 PM   PM User | #4
Roy Sinclair
Senior Coder

 
Join Date: Jun 2002
Location: Wichita
Posts: 3,880
Thanks: 0
Thanked 0 Times in 0 Posts
Roy Sinclair will become famous soon enough
Quote:
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).
Roy Sinclair is offline   Reply With Quote
Old 08-19-2002, 03:00 PM   PM User | #5
Composer
New to the CF scene

 
Join Date: Jul 2002
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Composer is an unknown quantity at this point
Thanks Roy -- that's what I was looking for!
Composer is offline   Reply With Quote
Old 05-13-2005, 10:05 PM   PM User | #6
semsem
New to the CF scene

 
Join Date: May 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
semsem is an unknown quantity at this point
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
semsem is offline   Reply With Quote
Old 05-16-2005, 09:47 PM   PM User | #7
Okiyah
New to the CF scene

 
Join Date: May 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Okiyah is an unknown quantity at this point
Quote:
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) ?
Okiyah is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:23 AM.


Advertisement
Log in to turn off these ads.