Welcome Guest, Not a member yet? Register   Sign In
Zip: Unexpected end of archive
#1

[eluser]asim111[/eluser]
Hi,
I am trying to compress a directory including all sub-directories & contents by using " Zip Encoding Class ". and want to download this zip file.

I am using this code:
Code:
$path = 'projects/';
$this->zip->read_dir($path);
$this->zip->download('projects_backup.zip');

Everything works for me but there is a problem:

when trying to extract it... it shows error message
Code:
C:\Users\MY_COMPUTER\Desktop\projects_backup.zip: Unexpected end of archive

i am able to repair this archive by using WINRAR -> Tools -> Repair Archive but it is not the real solution



is something wrong with the code?


Please Help!

Thank You!
#2

[eluser]SaJu[/eluser]
Hi,

I have faced the same problem while i tried to download a zip file from server to my local machine. But when I used a new controller for download function, it worked fine. I mean please create one more controller and write your download function and call this controller from previous one.




Theme © iAndrew 2016 - Forum software by © MyBB