George Pitcher wrote:

Jeremy,

I think I lead you down the wrong path with my last reply.

have a look at $_ENV['ORIG_PATH_TRANSLATED'] which, on my WinXP Apache2 box
gives 'C:\Apache\Apache2\htdocs\testsite\phpinfo.php'.
Is that what you are after?

George

I think my original message may have been confusing. I'll give a better example:

I have a path: /home/jeremy/public_html/test/test.php

What I want off of the path is just the "root" of the user's document root (e.g. where he stores all his publically viewable files): /home/jeremy/public_html/

Now, the document root can vary from server to server ... Like /var/www/ or /home/jeremy/www/ or whatever. So, I'd like to know if there was a way to dynamically fetch it, instead of putting together a list of the known document roots (hard-coding supported ones).

I hope that makes more sense!

--
Jeremy Privett [ http://www.jeremyprivett.com ]
Founder - Lead Software Developer - Hosting Systems Administrator
Omega Vortex
(http://www.omegavortex.com)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to