webserver root
| From: | Mitja Pagon | Date: | Fri, 07 Sep 2001 14:41:33 +0000 |
| Subject: | webserver root | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-9229@lists.php.net to get a copy of this message | ||
Hi!
I'm am an ASP developer, that decided to give PHP a try. So far I have been
nothing but impresed by PHP. But I have found one problem, that i can't find
a solution to.
When including files in ASP pages using <!--#virtual="/filename.asp"--> I
was able to include files into pages using path relative to the webserver
root. I have tried similar in PHP using include("/filename.php"), but just
recently learned that "/" slash charachter moves the pointer to the root of
the drive on which webserver directory is located on. I'm running PHP 4.0.6
on WinNT with IIS4.0, therefor $DOCUMENT_ROOT variable doesn't work. I'm
writing an application that should be portable not just from server to
server, but also from platform to platform, so I can't have fixed paths in
my scripts.
My question is: "Is there any way I can get the root of the webserver in a
fashion simmilar to that of the method ASP uses?"
Thanks,
Mitja Pagon