i think we checking in file2.php that it is included by file1.php by using defining constatnta the code something like this
file1.php .... define('__FOO_BAR',1) include('file2.php'); ..... file2.php if (!defined('__FOO_BAR')){ doredirect('file1.php'); } //your code goes by here ..... -----Original Message----- From: John Manko [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 15, 2003 2:26 PM To: [EMAIL PROTECTED] Subject: [PHP] Check if php file is an included file? If have file1.php that includes file2.php, is there any way to check, from file2.php, if it is indeed included. In other words, I don't want file2.php to display (rather redirect to file1.php) if it's not being requested as a file1.php include file. did I confuse you? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php