Re: include file identifier

From: Date: Sun, 04 Feb 2007 01:27:16 +0000
Subject: Re: include file identifier
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-248262@lists.php.net to get a copy of this message
Robert Cummings wrote:
Looking at the code above... it would seem you want:
    include_once()
It's not the idea..
I'm not trying to make that code work, I want to know which exact include (of the same file) does what.. Say you got a loop of self-include: e.g: === a.php <?php echo "\nRunning ".__FILE__." (id=X)!\t"; if ($visited<5) { echo "You are visiting here!"; $visited++; include(__FILE__); } else { echo "That's enough! Bye!"; } ?> In "(id=X)!".. what's the X? You may say you can use $visited as an identifier, but it's not the point I mean.. I want a global include file identifier, that is not dependent on other variables.

« previous php.general (#248262) next »