62 if (
false !== ($handle = dir(
$root)))
65 while (
false !== ($file = $handle->read()))
67 if (($file[0] !=
'.') && ($file !=
'index.php'))
69 if (is_dir(
$root .
'/' . $file))
71 $FILE[
'path' ][] = $file;
75 if ($file_type ===
'')
77 $FILE[
'filename' ][] = $file;
81 if (preg_match(
'/\.'.$file_type.
'$/i', $file))
83 $FILE[
'filename' ][] = $file;
92 natcasesort( $FILE[
'path' ] );
93 natcasesort( $FILE[
'filename' ] );
94 $FILE[
'path'] = array_merge([], $FILE[
'path']);
95 $FILE[
'filename'] = array_merge([], $FILE[
'filename']);