<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_34730"> 在線上解压zip <div class="blockcode"> <div id="code_ILT"><ol> <li><?php<li><li>$zipfile = 'test.zip';<li>$zipdir = './test/';<li>$zip = new ZipArchive();<li>$rs = $zip->open( $zipfile);<li><li>if($rs !== TRUE)<li>{<li> die('エラー :'. $rs);<li>}<li><li>$zip->extractTo($zipdir);</li> <li>$zip-> close();</li> <li>//unlink($zipfile);</li> <li> <li>$array = array();</li> <li> <li>if ($handle = opendir($zipdir)) {</li> <li> while (false !== ($file = readdir($ハンドル))) {</li> <li> if ($file != "." && $file != "..") {</li> <li> $array[] = $file;</li> <li> }</li> <li> }</li> <li> Closedir($handle);</li> <li>}</li> <li>sort ($array);</li> <li>var_dump($array);</li> </ol></div> <em onclick="copycode($('code_ILT'));">复制代</em> </div> </td></tr></table> <div id="comment_34730" class="cm"> </div> <div id="post_rate_div_34730"></div> <br><br>