note 77589 rejected from function.header by nlopess

From: Date: Wed, 05 Sep 2007 10:50:48 +0000
Subject: note 77589 rejected from function.header by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-130198@lists.php.net to get a copy of this message
Note Submitter: amit_patil198 at yahoo dot co dot in ---- 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");

« previous php.notes (#130198) next »