note 10094 deleted from ref.dir by didou

From: Date: Thu, 29 May 2003 22:18:49 +0000
Subject: note 10094 deleted from ref.dir by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-49344@lists.php.net to get a copy of this message
Note Submitter: fancao0515@0451.com ---- List all files in a directory tree under Win32: function list_dir($dirname) { if($dirname[strlen($dirname)-1]!='\\') $dirname.='\\'; static $result_array=array(); $handle=opendir($dirname); while ($file = readdir($handle)) { if($file=='.'||$file=='..') continue; if(is_dir($dirname.$file)) list_dir($dirname.$file.'\\'); else $result_array[]=$dirname.$file; } closedir($handle); return $result_array; }

« previous php.notes (#49344) next »