If you are using a downloader script to provide download and the downloaded zip file is corrupted, don’t panic, follow the steps below.
It is possible that your zip file is not uploaded completely. In my case, I uploaded 2 zip files via FTP software and they actually corrupted itself. Then I wasted 2 hours looking for solution using Google.
The script should only output the content zip file. Even an extra space character might cause problem.
Still not working? The problem might be in your header() strings. Compare your header strings with this.
$filename = 'path_to_your_file.zip'; header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-control: public"); header("Content-Description: File Transfer"); header('Content-type: application/zip'); header('Content-Disposition: attachment; filename="'.basename($filename).'"'); header("Content-Transfer-Encoding: binary"); header("Content-Length: " . filesize($filename) );
If it is still not working, contact your host and explain your problem to them.
or Subscribe to specific category only :
You must be logged in to post a comment.