On Sun, 21 May 2000, Joshua Chamas wrote:

> > So, there's no way in Apache::ASP to include a file by specifying a path
> > relative to DOCUMENT_ROOT, or relative to the directory of the current
> > file (which is not necessarily equivalent to the request URI, if the
> > current file is included)?
>
> <!--#include file= --> allows relative file specifications.
> Did it not work for you for some reason?

It does not work in this kind of situation:

/series/slayers/lina/index.inc does <!--#include file="../index.inc"-->
/series/slayers/index.inc does <!--#include file="../index.inc"-->

If I access http://.../series/slayers/lina/index.inc, then it will do the
first include correctly. But in the second include, it resolves the
path name relative to /series/slayers/lina/ instead of /series/slayers/,
so it ends up including /series/slayers/index.inc instead of
/series/index.inc.

I worked around this by doing "PerlSetVar IncludesDir /home/goamembers/www"
(which is my DOCUMENT_ROOT), and then using includes such as:

<!--#include file="/series/slayers/index.inc"-->
<!--#include file="/series/slayers/lina/index.inc"-->

-Philip Mak ([EMAIL PROTECTED])

Reply via email to