Re: Getting The Document Root
| From: | Jeremy Privett | Date: | Thu, 02 Feb 2006 13:39:26 +0000 |
| Subject: | Re: Getting The Document Root | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-229712@lists.php.net to get a copy of this message | ||
replies-lists-php@listmail.innovate.net wrote:
the DOCUMENT_ROOT server variable (available to php/perl in the standard methods for getting these) will give you the server's document root. in php, look at the output of: phpinfo() ------------ Original Message -------------- Jeremy Privett [ http://www.jeremyprivett.com ] Founder - Lead Software Developer - Hosting Systems Administrator Omega Vortex (http://www.omegavortex.com)Date: Thursday, February 02, 2006 07:14:22 AM -0600 From: Jeremy Privett <jeremy@omegavortex.com> To: php-general@lists.php.net Subject: [PHP] Getting The Document Root I'm looking for a method that would be able to extract the user's true document root (e.g. /home/jeremy/public_html/) so that I can use it for some filesystem scanning functions. I'm trying to avoid hard-coding supported document roots in favor of being able to dynamically detect it, but nothing is coming to mind. I thought I would consult some of the minds of the mailing list for advice. Any ideas or code would be greatly appreciated. -- 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---------- End Original Message ---------- No, what I'm looking for is the root of the document root, if that makes any sense.