zip - How php sorts the files -
zip - How php sorts the files -
$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 $fileinfo) { if (!$fileinfo->isdot()) { $this->db->query("insert files(file) values('{$fileinfo->getfilename()}, {$id})"); } }
i've uploaded zip file, i'am wondering how php sorts files? if files sorted 1, 2, 3, 4, 5, php sort them in order?
php zip
Comments
Post a Comment