Untitled
public text v1 · immutable<?php
function scandir($dir, $up){
$dh = opendir($dir);
while (false !== ($filename = readdir($dh))) {
$files[] = $filename;
}
if($up){
return sort($files);
}
return rsort($files);
}
?> <?php
function scandir($dir, $up){
$dh = opendir($dir);
while (false !== ($filename = readdir($dh))) {
$files[] = $filename;
}
if($up){
return sort($files);
}
return rsort($files);
}
?>