note 13037 modified in function.readfile by derick

From: Date: Wed, 02 Jan 2002 11:19:31 +0000
Subject: note 13037 modified in function.readfile by derick
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-24209@lists.php.net to get a copy of this message
On my win32 system, I found that readfile doesn't appear to open the file in binary mode, giving unexpected results when trying to process a binary file. A successfull workaround was to use:<br> // readfile($filename); $fp=fopen($filename,"rb"); fpassthru($fp); flush(); <br> Which does have the expected effect. [editors note: This was fixed in 4.0.5] --was-- On my win32 system, I found that readfile doesn't appear to open the file in binary mode, giving unexpected results when trying to process a binary file. A successfull workaround was to use:<br> // readfile($filename); $fp=fopen($filename,"rb"); fpassthru($fp); flush(); <br> Which does have the expected effect. http://www.php.net/manual/en/function.readfile.php

« previous php.notes (#24209) next »