note 34322 added to ref.dir

From: Date: Wed, 23 Jul 2003 21:36:07 +0000
Subject: note 34322 added to ref.dir
Groups: php.notes 
Request: Send a blank email to php-notes+get-52523@lists.php.net to get a copy of this message
Recursive function to browse folders (Unix) $base = '/home/'; function getDirList($base) { if(is_dir($base)){ $dh = opendir($base); while (false !== ($dir = readdir($dh))) { if (is_dir($base . $dir) && $dir !== '.' && $dir !== '..') { $subs = $dir ; $subbase = $base . $dir . '/'; print $subbase . "<br>"; getDirList($subbase); } else { next; } } closedir($dh); } else { print "no es dir"; } } getDirList($base); Regards Luis Tena O. Mexico City ---- Manual Page -- http://www.php.net/manual/en/ref.dir.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+34322 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+34322&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+34322&report=yes

« previous php.notes (#52523) next »