D. Alvarado <"D. Alvarado" <la***********@zipmail.com>> wrote:
Hello, I am running PHP 4 on my Fedora Core 2 dev machine, Apache
1.31. I made a
lot of calls to $_SERVER['DOCUMENT_ROOT']. Unfortunately, when I move
my application to a Windows environment, running on an IIS web server,
the variable $_SERVER['DOCUMENT_ROOT'] is no longer supported (I
always get an empty string).
Question: What is a cross-web server way of finding the path to the
document root -- the path to the public html folder?
Thanks for your help, - Dave
For most scripts you could try to obtain your current working directory and
remove the path given in REQUEST_URI (or maybe another one, that fits
better).
var_dump($_SERVER) should help you.
--
Simon Stienen <http://dangerouscat.net> <http://slashlife.de>
»What you do in this world is a matter of no consequence,
The question is, what can you make people believe that you have done.«
-- Sherlock Holmes in "A Study in Scarlet" by Sir Arthur Conan Doyle