[PHP] Getting The Document Root

2006-02-02 Thread Jeremy Privett
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

Re: [PHP] Getting The Document Root

2006-02-02 Thread Silvio Porcellana [tradeOver]
Jeremy Privett wrote: 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

Re: [PHP] Getting The Document Root

2006-02-02 Thread Jeremy Privett
07:14:22 AM -0600 From: Jeremy Privett [EMAIL PROTECTED] 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

Re: [PHP] Getting The Document Root

2006-02-02 Thread Barry
Jeremy Privett wrote: No, what I'm looking for is the root of the document root, if that makes any sense. not at all ^_^ -- Smileys rule (cX.x)C --o(^_^o) Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] Getting The Document Root

2006-02-02 Thread Jim Moseby
No, what I'm looking for is the root of the document root, if that makes any sense. How about $_SERVER['DOCUMENT_ROOT']? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Getting The Document Root

2006-02-02 Thread Jeremy Privett
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

Re: [PHP] Getting The Document Root

2006-02-02 Thread John Nichel
Jeremy Privett wrote: 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

Re: [PHP] Getting The Document Root

2006-02-02 Thread Jeremy Privett
John Nichel wrote: $_SERVER['DOCUMENT_ROOT'] http://www.php.net/manual/en/reserved.variables.php#reserved.variables.server Nope. I've already tried that... $_SERVER['DOCUMENT_ROOT'] contains /home/jeremy/public_html/test/ ... All I want is to the public_html part. -- Jeremy Privett [

Re: [PHP] Getting The Document Root

2006-02-02 Thread Joe Henry
you could try pathinfo() http://us3.php.net/pathinfo On Feb 2, 2006, at 8:59 AM, Jeremy Privett wrote: John Nichel wrote: $_SERVER['DOCUMENT_ROOT'] http://www.php.net/manual/en/ reserved.variables.php#reserved.variables.server Nope. I've already tried that... $_SERVER['DOCUMENT_ROOT']

Re: [PHP] Getting The Document Root

2006-02-02 Thread John Nichel
Jeremy Privett wrote: John Nichel wrote: $_SERVER['DOCUMENT_ROOT'] http://www.php.net/manual/en/reserved.variables.php#reserved.variables.server Nope. I've already tried that... $_SERVER['DOCUMENT_ROOT'] contains /home/jeremy/public_html/test/ ... All I want is to the public_html part.

Re: [PHP] Getting The Document Root

2006-02-02 Thread Jeremy Privett
John Nichel wrote: Jeremy Privett wrote: John Nichel wrote: $_SERVER['DOCUMENT_ROOT'] http://www.php.net/manual/en/reserved.variables.php#reserved.variables.server Nope. I've already tried that... $_SERVER['DOCUMENT_ROOT'] contains /home/jeremy/public_html/test/ ... All I want is to

Re: [PHP] Getting The Document Root

2006-02-02 Thread tedd
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/

Re: [PHP] Getting The Document Root

2006-02-02 Thread Richard Lynch
On Thu, February 2, 2006 7:14 am, Jeremy Privett wrote: 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

Re: [PHP] Getting The Document Root

2006-02-02 Thread Richard Lynch
On Thu, February 2, 2006 9:59 am, Jeremy Privett wrote: John Nichel wrote: $_SERVER['DOCUMENT_ROOT'] http://www.php.net/manual/en/reserved.variables.php#reserved.variables.server Nope. I've already tried that... $_SERVER['DOCUMENT_ROOT'] contains /home/jeremy/public_html/test/ ... All I