PHP Classes

Corruption when zipping multiple files

Recommend this page to a friend!

      TAR/GZIP/BZIP2/ZIP Archives  >  All threads  >  Corruption when zipping multiple files  >  (Un) Subscribe thread alerts  
Subject:Corruption when zipping multiple files
Summary:Works for single file, but corrupts with multiple files
Date:2009-05-09 20:37:32

  1. Corruption when zipping multiple files   Reply   Report abuse  
GSchlais - 2009-05-09 20:37:33
This script works great as long as there is only one file in the directory to add to the zip file. The resulting file can be extracted on linux, windows and Mac. The problem is when I add more than one file to the zip, the resulting archive will only extract on the linux machine. Both windows and Mac complain about an unexpected end of file.

Can anyone help?


$test = new zip_file("HoG/$KIT".".zip");
$test->set_options(array('inmemory' => 0, 'recurse' => 0, 'storepaths' => 0));