I have a zip fie that is good and works when extracting.
When I download the same file it gets corrupted.
The size downloaded is correct, but it does not work.
Error message:
"Can not open the file as zip archive.
Is not archive"
My download code is:
$path = 'zipfile/images.zip';
$type = mime_content_type($path);
header('Content-Type: '.$type);
header('Content-Transfer-Encoding: binary');
header('Content-Disposition: attachment; filename="'.basename($path).'"');
header('Content-Length: '.filesize($path));
readfile($path);