|
Posted by Jon Slaughter on 04/21/07 22:36
do I have to prefix every absolute path with document root to get it to
work?
For some reason I thought that prefixing a path with '/' or './' with make
it absolute w.r.t to document root but I guess not?
e.g., when I do
include './Scripts/AddNav.php';
or
include '/Scripts/AddNav.php';
It only happens to work if that path is in the current directory but it
won't goto the root directory.
i.e., the above is doing the exact same as if I did
include 'Scripts/AddNav.php';
But in any case this doesn't work in general unless I use
include $_SERVER['DOCUMENT_ROOT'].'/Scripts/AddNav.php';
ofcourse this seems like a mess to do every time I want to use an absolute
path... which is a lot.
Is that what I'm stuck with doing or is there a function, say, like abp that
will take a path and prefix the document root to it?
Thanks,
Jon
Navigation:
[Reply to this message]
|