Re: __FILE__ and DOCUMENT_ROOT

From: Date: Mon, 17 Jun 2002 21:38:09 +0000
Subject: Re: __FILE__ and DOCUMENT_ROOT
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-102610@lists.php.net to get a copy of this message
The problem is, I am doing this to an include file, so SCRIPT_FILENAME would just return the filename for the top file, not the include. "Stuart Dallas" <stuart@sharedserver.net> wrote in message news:544068480.20020617222922@sharedserver.net... > On Monday, June 17, 2002 at 9:53:42 PM, Taylor York wrote: > > __FILE__ = /freemai/public_html/sam/page2.php > > $DOCUMENT_ROOT = /home/freemai/public_html > > > is there a way to get > > > /home/freemai/public_html/sam/page2.php > > A couple of options... > > $_SERVER["SCRIPT_FILENAME"] > and > $_SERVER["PATH_TRANSLATED"] > > Create a page containing just > > <?php phpinfo(); ?> > > and have a look at the PHP Variables section of it. > > -- > Stuart >

« previous php.general (#102610) next »