note 77589 added to function.header

From: Date: Wed, 05 Sep 2007 07:19:30 +0000
Subject: note 77589 added to function.header
Groups: php.notes 
Request: Send a blank email to php-notes+get-130190@lists.php.net to get a copy of this message
I m using this script...It downloads file but does not saves it properly...it contails ASCII data and other characters... Is their any problem in this script...? Please rectify me....! if (!file_exists($f_name)) { echo "File not found."; exit; }; header("Pragma: public"); // required header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: private",false); // required for certain browsers header("Content-Type: text/plain"); header("Content-Length: ".(filesize($f_name)).";" ); header("Content-Disposition: attachment; filename=".basename($f_name).";"); header("Content-Transfer-Encoding: binary\n"); readfile("$f_name"); ---- Server IP: 203.199.69.133 Probable Submitter: 59.162.92.178 ---- Manual Page -- http://www.php.net/manual/en/function.header.php Edit -- https://master.php.net/note/edit/77589 Del: integrated -- https://master.php.net/note/delete/77589/integrated Del: useless -- https://master.php.net/note/delete/77589/useless Del: bad code -- https://master.php.net/note/delete/77589/bad+code Del: spam -- https://master.php.net/note/delete/77589/spam Del: non-english -- https://master.php.net/note/delete/77589/non-english Del: in docs -- https://master.php.net/note/delete/77589/in+docs Del: other reasons-- https://master.php.net/note/delete/77589 Reject -- https://master.php.net/note/reject/77589 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#130190) next »