Re: Getting The Document Root

From: Date: Thu, 02 Feb 2006 20:59:41 +0000
Subject: Re: Getting The Document Root
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-229765@lists.php.net to get a copy of this message
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

« previous php.general (#229765) next »