note 42509 deleted from function.get-included-files by betz

From: Date: Wed, 19 May 2004 15:27:53 +0000
Subject: note 42509 deleted from function.get-included-files by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-69830@lists.php.net to get a copy of this message
Note Submitter: flany@arsonik.com ---- just a trick, for who want get the name of the "parent file" (where the "include" function(s) are) : $parent = array_shift(array_reverse (explode("\\", dirname(array_shift(get_included_files()))), TRUE)); // windows $parent = array_shift(array_reverse (explode("/", dirname(array_shift(get_included_files()))), TRUE)); // Linux Perhaps it exist something more simple ... i hope this useful . flany

« previous php.notes (#69830) next »