Oh, guess I ought to read the full question before I answer ;)
When you say "does not work", do you mean it's not what you're looking for, or that it returns nothing?
Main Topics
Browse All TopicsIs there any way I can retrieve the server's root file path from within my PHP 5.0 scripts? It seems a bit odd such a feature would not be available for the language. Im using Windows 2003 Server IIS6 at work.
$_SERVER['DOCUMENT_ROOT'] does not work for me.
Thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
As you said: http://us3.php.net/manual/
Maybe you can just wait till a very low-traffic time (3am ?) and do it [you can probably schedule a restart if you don't plan on being at work at 3 in the morning :) ]
I'm not sure what other $_SERVER vars are available on IIS, but at the very least maybe you can parse the part of the path you need out of the __FILE__ constant or one of the other $_SERVER vars.
Matt
Business Accounts
Answer for Membership
by: snoyes_jwPosted on 2005-08-12 at 11:37:38ID: 14663503
I'm not sure which of these you're looking for: ];
d.variable s
$_SERVER['PATH_TRANSLATED'
$_SERVER['DOCUMENT_ROOT'];
http://www.php.net/reserve