PDA

View Full Version : ZIp functions not working


bhavyait
08-04-2010, 04:38 PM
function unZipFile($dir,$file_name,$unzipDir) {
$zip = zip_open($dir . "/" . $file_name);
if (is_resource($zip)) {
while ($zip_entry = zip_read($zip)) {
$fp = fopen($unzipDir."/".zip_entry_name($zip_entry), "w");
if (zip_entry_open($zip, $zip_entry, "r")) {
$buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry));
fwrite($fp,"$buf");
zip_entry_close($zip_entry);
fclose($fp);
}
}
zip_close($zip);
}
}

above function work properly on hosted web site.

Does not work in standalone java. I am using quercus-4.0.8