note 59783 deleted from class.dir by bjori

From: Date: Fri, 14 Apr 2006 22:15:40 +0000
Subject: note 59783 deleted from class.dir by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-108115@lists.php.net to get a copy of this message
Note Submitter: jaqb at jaqb dot int dot pl dot removeme ---- there is a little bug in pervious post. I've changed it a bit: <?php function read_dir($dir) { $array = array(); $d = dir($dir); while (false !== ($entry = $d->read())) { if($entry!='.' && $entry!='..') { $entry = $dir.'/'.$entry; if(is_dir($entry)) { $array = array_merge($array, read_dir($entry)); } else { $array[] = $entry; } } } $d->close(); return $array; } ?> now it works perfect ;-)

« previous php.notes (#108115) next »