note 62413 deleted from function.dirname by danbrown

From: Date: Sun, 20 Jul 2008 19:05:50 +0000
Subject: note 62413 deleted from function.dirname by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-142267@lists.php.net to get a copy of this message
Note Submitter: jay jansheski ---- <? // gets the folder name of the current script function this_folder_name($path){ if (!$path){$path=$_SERVER['PHP_SELF'];} $current_directory = dirname($path); $current_directory = str_replace('\\','/',$current_directory); $current_directory = explode('/',$current_directory); $current_directory = end($current_directory); return $current_directory; } print this_folder_name(); ?>

« previous php.notes (#142267) next »