If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Invalid Zip file

Can anyone help me figure out why when I download a zip file with headers in php it is invalid? The file opens fine on my server but when I test my download code and save the file to my desktop it says it is invalid. What could be causing this? Here is the code I am using to download the zip file:

When I remove the ob_clean() it works. I am a little new to php so does that function have any security issues I should be concerned about? Also, is there something that would cause the rest of the page to not be output after the readfile()? For some reason the download is working fine but the message and footer I have placed on the page after the headers are not being output. The exit function in the above code is moved down after the message and footer.

In your case following program method must be useful Fix zip file tool may restore your zip archives in cases: ZIP file you have been downloading for so long is broken, corrupt and cannot be opened and others.