note 39421 added to function.readfile

From: Date: Wed, 28 Jan 2004 09:21:56 +0000
Subject: note 39421 added to function.readfile
Groups: php.notes 
Request: Send a blank email to php-notes+get-64299@lists.php.net to get a copy of this message
Beware using ob_start() in conjunction with header() when force downloading files! If you do use ob_start() WITHOUT calling ob_clean(), any data left in the header will be added to the beginning of whatever file is downloaded. To ensure this doesnt happen make sure you insert ob_clean() somewhere before the first header() in your download functions / scripts. I hope this saves someone the hours I spent looking for this answer ;) ---- Manual Page -- http://www.php.net/manual/en/function.readfile.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+39421 Delete -- http://master.php.net/manage/user-notes.php?action=delete+39421&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+39421&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#64299) next »