note 42509 added to function.get-included-files

From: Date: Wed, 19 May 2004 10:24:43 +0000
Subject: note 42509 added to function.get-included-files
Groups: php.notes 
Request: Send a blank email to php-notes+get-69823@lists.php.net to get a copy of this message
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 ---- Manual Page -- http://www.php.net/manual/en/function.get-included-files.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+42509 Delete -- http://master.php.net/manage/user-notes.php?action=delete+42509&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+42509&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#69823) next »