$z = new zip(); $z->ExtractAll($zipfile,$tmpzipdir); $fm = new FileManagement(); $imgs = array(); $fm->GetMatchFiles($tmpzipdir,"jpg|png|gif",$imgs);
在这个代码的后面加入如下代码//调整解压缩出来的数组 $tmpimgs = array(); foreach($imgs as $k=>$v){ preg_match_all("//(d+)./",$v,$kk); $tmpimgs[$kk[1][0]-1] = $v; } ksort($tmpimgs); $imgs = $tmpimgs; unset($tmpimgs);