note 102454 rejected from faq.using by danbrown

From: Date: Wed, 16 Feb 2011 13:56:14 +0000
Subject: note 102454 rejected from faq.using by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-177027@lists.php.net to get a copy of this message
Note Submitter: p dot deshpande at optrasystems dot com ---- I am not able to download zip file using php. Is there any solution to download zip file with its content. I can download but content is not showing. my tried code: if ((isset($file))&&(file_exists($dir.$file))) { header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Content-Description: File Transfer"); header('Content-Disposition: attachment; filename="'.$dir.$file.'"'); header("Content-Transfer-Encoding: Binary"); header("Content-length: ".filesize($dir.$file)); header("Content-Type: application/zip"); header('Content-Disposition:attachment;filename="'.$file.'"'); ob_clean(); flush(); readfile($dir.$file); }

« previous php.notes (#177027) next »