I upload my file with file .zipusing this PHP class:
public function download($file)
{
$filename = $this->dir . $file;
$fp = fopen($filename, "rb");
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/octet-stream");
header("Content-length: " . filesize($filename));
header("Content-disposition: attachment;filename = " . $file . "");
header("Content-Transfer-Encoding: binary");
readfile($filename);
ob_end_clean();
die(fpassthru($fp));
fclose($fp);
}
this worked and I uploaded the file .zipsuccessfully. but when I need to extract the file .zipusing winrar, I see this error:
db-backup-2014-11-15_14-18-48-12.zip: The archive is either in unknown format or damaged.
in download:

in the opened:

in excerpt:

NOTE. my source file worked and was perfectly extracted using winrar.
I think my problem is CRC32 = 0000000 (on the first screen), because there is a true value in the source file.
how to fix this problem ?!
source
share