note 102454 added to faq.using

[email protected] Tue, 15 Feb 2011 22:38:36 -0800
Newsgroups php.notes
Message-ID <[email protected]>
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);
	}
----
Server IP: 202.65.157.132
Probable Submitter: 114.143.128.26
----
Manual Page -- http://www.php.net/manual/en/faq.using.php
Edit        -- https://master.php.net/note/edit/102454
Del: integrated  -- https://master.php.net/note/delete/102454/integrated
Del: useless     -- https://master.php.net/note/delete/102454/useless
Del: bad code    -- https://master.php.net/note/delete/102454/bad+code
Del: spam        -- https://master.php.net/note/delete/102454/spam
Del: non-english -- https://master.php.net/note/delete/102454/non-english
Del: in docs     -- https://master.php.net/note/delete/102454/in+docs
Del: other reasons-- https://master.php.net/note/delete/102454
Reject      -- https://master.php.net/note/reject/102454
Search      -- https://master.php.net/manage/user-notes.php