Guys I made a little kitchen and the update files when copied from the web app directory are fine and correctly works. However when are downloaded from web browser ("save as") the Spica recovery says: "cant open something.zip (bad). I dont understand why, the structure and the files are exactly the same than the original, however the file is couple of KB larger than the original (the one it works). the /system and /META-INF folders has the same size (than the original) but the zip itself is for some reason larger - and that reason it's not accepted by recovery.
I tried several ways:
$zipfile is "something.zip".
Anyone knows what could be wrong?Code:header("Cache-Control: public"); header("Content-Description: File Transfer"); header("Content-Disposition: attachment; filename=$zipfile"); header("Content-Type: application/zip"); header("Content-Transfer-Encoding: binary"); readfile($zipfile); or header("Content-type: application/zip"); header("Content-Disposition: attachment;filename=$zipfile"); readfile($zipfile);
EDIT, SOLVED
Code:if (file_exists($zipfile)) { header('Content-Description: File Transfer'); header('Content-Type: application/zip'); header('Content-Disposition: attachment; filename='.basename($zipfile)); header('Content-Transfer-Encoding: binary'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); header('Content-Length: ' . filesize($zipfile)); ob_clean(); flush(); readfile($zipfile); exit; }


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks