我想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);
}
?>
有没有办法做到这一点?