我希望glob
将相同的文件顺序(排序)返回为opendir
例如:
$files = glob('/home/web/public_html/audio/*.mp3');
foreach($files as $file) {
echo $file;
break;
}
if ($handle = opendir('/home/web/public_html/audio/')) {
while (false !== ($entry = readdir($handle))) {
if ($entry != "." && $entry != "..") {
echo "$entry\n";
break;
}
}
closedir($handle);
}
?>
有办法做到这一点吗?