<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_32641"> <div class="blockcode"> <div id="code_dSv"><ol> <li> <li><?php<li>/**********************<li>*@file - path to zip file<li>*@destination - destination directory for unzipped files<li>*/<li>function unzip_file($file, $destination){<li>// create object<li>$zip = new ZipArchive() ;<li>// open archive<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> <li>?></li> </ol></div> <em onclick="copycode($('code_dSv'));">复制代码</em> </div> </td></tr></table> <div id="comment_32641" class="cm"> </div> <div id="post_rate_div_32641"></div> <br><br>