<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_61476"> 可解压缩zip文件。它有两个参数:压缩文件的路径、目标文件的路径。 <div class="blockcode"> <div id="code_jO3"><ol> <li> function unzip_file($file, $destination) { </li> <li> // create object </li> <li> $zip = new ZipArchive() ; </li> <li> // open archive </li> <li> if ($zip->open($file) !== TRUE) { </li> <li> die ('Could not open archive'); </li> <li> } </li> <li> // extract contents to destination directory </li> <li> $zip->extractTo($destination); </li> <li> // close archive </li> <li> $zip->close(); </li> <li> echo 'Archive extracted to directory'; </li> <li> } </li> </ol></div> <em onclick="copycode($('code_jO3'));">复制代码</em> </div> <br> </td></tr></table> <div class="ptg mbm mtn"> 解压缩, PHP, zip</div> <div id="comment_61476" class="cm"> </div> <div id="post_rate_div_61476"></div> <br><br>