note 105680 rejected from function.readfile by danbrown

From: Date: Tue, 06 Sep 2011 23:00:34 +0000
Subject: note 105680 rejected from function.readfile by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-182996@lists.php.net to get a copy of this message
Note Submitter: immanuel at ftfdesigns dot com ---- It seems an IF Statement right before preparing a readfile() corrupts the file being download. There are probably similar actions that would result in this same problem but I found this out while using an IF statement (unrelated to the download process) before writing headers for a readfile(). I recommend including the ob_clean() function after the headers i.e. as shown in Example 1. Many snippet codes for readfile() functions out there tend to skip ob_clean(); so double-check it's there before/after pasting that code. :)

« previous php.notes (#182996) next »