tags:

views:

32

answers:

1

On archiving more number of files , zip is returning a empty zip file which cannot be open and its corrupted.

When i try to pint Zip archive object , i got this

ZipArchive Object ( [status] => 5 [statusSys] => 2 [numFiles] => 84 [filename] => /root/zip/3810.zip [comment] => )

The file is not even created.

for lesss number files it working fine .

ZipArchive Object ( [status] => 0 [statusSys] => 0 [numFiles] => 0 [filename] => [comment] => )

what is this status and satusSys?

How can i debug?

A: 

Make sure after you've zipped everything that you ZipArchive::close() after you've added all of your files. If you don't use the close() function then the zip file is never created.

This would be done with:

$zip->close();
steven_desu