CodeIgniter Forums
Zip files corrupted - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Zip files corrupted (/thread-45543.html)



Zip files corrupted - El Forum - 09-26-2011

[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.