note 70879 rejected from function.readfile by nlopess

From: Date: Sat, 02 Dec 2006 20:00:48 +0000
Subject: note 70879 rejected from function.readfile by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-120237@lists.php.net to get a copy of this message
Note Submitter: nicolas at foonster dot com ---- 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.

« previous php.notes (#120237) next »