php如何排序文件

时间:2014-06-23 06:46:26

标签: php zip

$zip = new ZipArchive;
$zip->open($uploadDir.$_FILES['zip']['name']);
$zip->extractTo($uploadDir);
$zip->close();
unlink($uploadDir.$_FILES['zip']['name']);
$dir = new DirectoryIterator($uploadDir);
foreach ($dir as $fileinfo) {
    if (!$fileinfo->isDot()) {
        $this->db->query("INSERT INTO files(file) VALUES('{$fileinfo->getFilename()}, {$id})");
    }
}

我上传了一个zip文件,我想知道php如何对这些文件进行排序?如果文件按1,2,3,4,5排序,php将按此顺序排序吗?

0 个答案:

没有答案