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?
<?php
require_once('includes/archive.inc');
$test = new zip_file("HoG/$KIT".".zip");
$test->set_options(array('inmemory' => 0, 'recurse' => 0, 'storepaths' => 0));
$test->add_files("HoG/$KIT"."*.pdf");
$test->create_archive();
?>