Re: Getting The Document Root

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 want is to the public_html
> part.

dirname($_SERVER['DOCUMENT_ROOT'])
http://php.net/dirname

Though, really, you're not making any sense at all...

Whatever it is you are trying to do, you're probably doing it wrong...

That said, again, if the value you want isn't in, or derivable from,
phpinfo() then you probably can't get it...

If you always want one directory *above* DOCUMENT_ROOT, dirname is
your answer.  If that's not what you want, then I doubt anybody will
understand what you want from what's posted so far.

-- 
Like Music?
http://l-i-e.com/artists.htm

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux