By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,353 Members | 1,529 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,353 IT Pros & Developers. It's quick & easy.

Various path/path/files.asp all #include this 1 file

P: n/a
Ok, I give up.

I need to #include the same 1 file (IncludeThis.asp) into 3 different asp
files.

1> C:\MyDir\ThisFile.asp
2> D:\MyDir\AASubSub\ThatFile.asp
3> E:\MyDir\CCSub\DDSubSub\AnotherFile.asp

On another server... those same 3 files... need to include
their own local copy of IncludeThis.asp

4> D:\EEDir\ThisFile.asp
5> E:\FFDir\GGSubSub\ThatFile.asp
6> F:\HHDir\IISub\JJSubSub\AnotherFile.asp

Is there a way I can make an #include statement that I can
put in the files... that will still find the IncludeFile.asp... regardless
of the different drives, different paths, different levels of dir nesting?
(Base filenames 1,2,3... are the same as 4,5,6, respectively.)

The include-file will always be called IncludeThis.asp
(Where should I put it?)
Jul 22 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Sun, 10 Jul 2005 00:32:36 -0400, "\"A_Michigan_User\""
<Mi**************@ameritech.net> wrote:
Ok, I give up.

I need to #include the same 1 file (IncludeThis.asp) into 3 different asp
files.

1> C:\MyDir\ThisFile.asp
2> D:\MyDir\AASubSub\ThatFile.asp
3> E:\MyDir\CCSub\DDSubSub\AnotherFile.asp

On another server... those same 3 files... need to include
their own local copy of IncludeThis.asp

4> D:\EEDir\ThisFile.asp
5> E:\FFDir\GGSubSub\ThatFile.asp
6> F:\HHDir\IISub\JJSubSub\AnotherFile.asp

Is there a way I can make an #include statement that I can
put in the files... that will still find the IncludeFile.asp... regardless
of the different drives, different paths, different levels of dir nesting?
(Base filenames 1,2,3... are the same as 4,5,6, respectively.)

The include-file will always be called IncludeThis.asp
(Where should I put it?)


You need to put it where it can be access by a path from all
locations. Which likely means a UNC path to the separate servers,
dealing with permissions for the account accessing the UNC path. And
the possibility that a server connection is lost and all your pages
break.

Or, use a script to replicate the include to several locations that
are easier to access.

Jeff
Jul 22 '05 #2

P: n/a
"A_Michigan_User" wrote:
Ok, I give up.

I need to #include the same 1 file (IncludeThis.asp) into 3 different asp
files.

1> C:\MyDir\ThisFile.asp
2> D:\MyDir\AASubSub\ThatFile.asp
3> E:\MyDir\CCSub\DDSubSub\AnotherFile.asp

On another server... those same 3 files... need to include
their own local copy of IncludeThis.asp

4> D:\EEDir\ThisFile.asp
5> E:\FFDir\GGSubSub\ThatFile.asp
6> F:\HHDir\IISub\JJSubSub\AnotherFile.asp

Is there a way I can make an #include statement that I can
put in the files... that will still find the IncludeFile.asp... regardless
of the different drives, different paths, different levels of dir nesting?
(Base filenames 1,2,3... are the same as 4,5,6, respectively.)

The include-file will always be called IncludeThis.asp
(Where should I put it?)

I'd sugest you create a folder at C:\MyDir\SharedIncludes\, then for
each website create a 'virtual directory' in IIS that points to this
path, you'll then be able to include any files in this new directory
into any site that has the virtual folder.

d.
Jul 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.