8571 shaares
344 private links
344 private links
function recursive_read($directory, $entries_array = array()) {
if(is_dir($directory)) {
$handle = opendir($directory);
while(FALSE !== ($entry = readdir($handle))) {
if($entry == '.' || $entry == '..') {
continue;
}
$Entry = $directory . DS . $entry;
if(is_dir($Entry)) {
$entries_array = recursive_read($Entry, $entries_array);
} else {
$entries_array[] = $Entry;
}
}
closedir($handle);
}
return $entries_array;
}