There's a complicated include structure being used by the files in my
website right now. It goes like this:

http://members.girlsofanime.com/slayers/lina/index.asp:
        <!--#include file="index.inc"-->
/slayers/lina/index.inc:
        <!--#include file="/slayers/index.inc"-->
/slayers/index.inc: (also included by /slayers/index.asp)
        <!--#include file="/q-z.inc"-->
/slayers/q-z.inc: (also included by /slayers/q-z.asp)
        <!--#include file="/series.inc"-->
/series.inc: (also included by /series.asp)
        <!--#include file="/index.inc"-->

This is why I can't just change it to <!--#include file="index.inc"-->
instead of <!--#include file="/index.inc"-->, because I actually use both,
and they mean different things; the former means slayers/lina/index.inc,
while the latter means index.inc in the root www directory.

Is there any way to specify <!--#include file--> either relative to the
root www directory, or relative to the current file (even if the current
file is an included file that is in a different directory from the file
including it)?

Or have I created a big mess that should have never been done in the first
place? Perhaps I should perform a kludge fix of doing a global search and
replace on all files to specify /home/goamembers/www in the path name so
that it will work for the moment, and then look into redesigning the code?

-Philip Mak ([EMAIL PROTECTED])

On Sat, 26 Aug 2000, Joshua Chamas wrote:

> Philip Mak wrote:
> > 
> > Recently, I reinstalled mod_perl and Apache::ASP on my system in order to
> > fix a problem I was having with ASP not using the new version of perl on
> > my system. However, I'm having problem with some old code.
> > 
> > I used to do this:
> > 
> > In httpd.conf: PerlSetVar IncludesDir /home/goamembers/www
> > In an ASP script: <!--#include file="/index.inc"-->
> > 
> > Notice the "/" in "/index.inc". This would force it to get index.inc from
> > /home/goamembers/www, instead of the current directory. This makes it kind
> > of like <!--#include virtual--> does with respect to filenames that start
> > with "/" (but include virtual cannot be used to inline asp code).
> > 
> 
> That functionality was never intended to be supported, and 
> am surprised it ever worked!  How painful would it be for
> you to change your includes to be like <!--#include file="index.inc"-->

Reply via email to