Re: Parent File Constant?

From: Date: Fri, 30 Jun 2000 15:49:06 +0000
Subject: Re: Parent File Constant?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-4046@lists.php.net to get a copy of this message
$PHP_SELF will tell you what the current document is. For example say you have the following file called temp.php3 and it includes the following lines.. <? include ('header.php'); include ('main.php'); include ('footer.php'); ?> if you were to call $PHP_SELF; in any of the included files, it would return temp.php3 Jordan ""Cosenza, Mario"" <mcosenza@engsvcs.com> wrote in message news:A8F517777541D411BFFB02204840172112B582@EXCHANGE1... > I've been looking through the list archives and the manual, but can't find > out... > > how to get the name of the parent file (from an include statement). > > Example: main.php includes "header.php" and "footer.php". How does > header.php (or footer.php) know that it was called by main.php, and not some > other file? > > Is there a php constant or function that returns the parent file path/name? > Or do I have to set a variable before my include statement? > > Thanks, > > mario > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#4046) next »