note 70879 added to function.readfile

From: Date: Thu, 02 Nov 2006 10:21:02 +0000
Subject: note 70879 added to function.readfile
Groups: php.notes 
Request: Send a blank email to php-notes+get-119312@lists.php.net to get a copy of this message
Good Morning, All my download files are corrupting because a character is being prepended to the data from the readfile. I cannot locate it: <?PHP header("Pragma: no-cache"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: private",false); header("Content-Type: application/vnd.ms-excel"); header("Content-Disposition: attachment; filename=\"test.xls\""); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".filesize( 'store.xls' ).""); readfile( 'store.xls' ); exit; ?> This is my code - any help would be appreciated. ---- Server IP: 64.71.164.2 Probable Submitter: 68.219.206.84 ---- Manual Page -- http://www.php.net/manual/en/function.readfile.php Edit -- https://master.php.net/note/edit/70879 Del: integrated -- https://master.php.net/note/delete/70879/integrated Del: useless -- https://master.php.net/note/delete/70879/useless Del: bad code -- https://master.php.net/note/delete/70879/bad+code Del: spam -- https://master.php.net/note/delete/70879/spam Del: non-english -- https://master.php.net/note/delete/70879/non-english Del: in docs -- https://master.php.net/note/delete/70879/in+docs Del: other reasons-- https://master.php.net/note/delete/70879 Reject -- https://master.php.net/note/reject/70879 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#119312) next »