note 32084 added to language.constants.predefined
| From: | hixon at colorado dot edu | Date: | Thu, 15 May 2003 22:21:30 +0000 |
| Subject: | note 32084 added to language.constants.predefined | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-48048@lists.php.net to get a copy of this message | ||
You can use the following in files that you want to include, but not run directly. The script will
exit if it's run as the top-level script, but will not exit if it's included from another
script. Of course this won't work in the command line mode.
if (realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME'])) {
exit;
}
--
http://www.php.net/manual/en/language.constants.predefined.php
http://master.php.net/manage/user-notes.php?action=edit+32084
http://master.php.net/manage/user-notes.php?action=delete+32084
http://master.php.net/manage/user-notes.php?action=reject+32084