CodeIgniter Forums

Full Version: Zip files corrupted
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]vile[/eluser]
Hi,

Can you please help me fix this problem with zip encoding class.
I used CI 2 zip class. Here's my code

Code:
for($i = 0 ;$i<=3;$i++) //loop
{
    file_put_contents( $dir_path.$filename, $pdf);
    $this->zip->read_file($dir_path.$filename);
}
$this->zip->archive($dir_path.'test_arch.zip');


It can already create a zip file, but the problem is the files in it is corrupted.
When i open it using winzip,the file size is OK but CRC32 is 000000.