function unzip($location,$newlocation){ if(exec(unzip $location,$arr)){ mkdir($newlocation); for($i = 1;$i $file = trim(preg_replace(~inflating: ~,,$arr[$i])); copy($location.'/'.$file,$newlocation.'/'.$file); unlink($location.'/'.$file); } return true; }else{ return false; }}
复制代码
用法:
复制代码
php, zip