note 39774 deleted from ref.dir by sniper

From: Date: Fri, 16 Dec 2005 00:00:39 +0000
Subject: note 39774 deleted from ref.dir by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-100260@lists.php.net to get a copy of this message
Note Submitter: phil at "DELETETHIS"blissnetworks dot net ---- I searched around and couldn't find a decent function that JUST returned directories, not files. I couldn't get the ones here to work so i wrote my own. <?php function read_dir($path){ static $dir_arr = array () ; $handle=opendir($path); while ($file = readdir($handle)) { if ($file != "." && $file != ".." && is_dir($path.$file)) { $sub_dir = $path . $file . "/" ; $dir_arr[] = $sub_dir ; read_dir($sub_dir); } } return $dir_arr ; } ?>

« previous php.notes (#100260) next »