Re: Include Files self aware?

From: Date: Wed, 01 May 2002 00:15:56 +0000
Subject: Re: Include Files self aware?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-95457@lists.php.net to get a copy of this message
On Tue, 30 Apr 2002, PHP List wrote: > Is it possible to detect if a file is being called as an include or require? > > ex: > include("file.php") <-- file.php code can "detect" that is has been > called as an include. Compare $PHP_SELF with __FILE__, maybe? miguel

« previous php.general (#95457) next »