note 68741 deleted from function.readfile by didou

From: Date: Tue, 02 Jan 2007 14:58:31 +0000
Subject: note 68741 deleted from function.readfile by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-121190@lists.php.net to get a copy of this message
Note Submitter: rhoward at progsoc dot uts dot edu dot removethis dot au ---- We've just run into a problem where certain PDF files are only partially printed when readfile() is being used inside a buffer. To fix this, you need to add an @ob_flush() after the call to readfile(), eg. <?php ob_start(); readfile('example.file'); // use @ to hide 'nothing to flush' errors @ob_flush(); $content = ob_get_contents(); ob_end_clean(); ?>

« previous php.notes (#121190) next »