PHP 4.0 Bug #4516: Filesystem Functions bug

From: Date: Fri, 19 May 2000 09:11:22 +0000
Subject: PHP 4.0 Bug #4516: Filesystem Functions bug
Groups: php.dev 
Request: Send a blank email to php-dev+get-18946@lists.php.net to get a copy of this message
From: species@hem2.passagen.se Operating system: Windows 2000 PHP version: 4.0 Release Candidate 1 PHP Bug Type: Other Bug description: Filesystem Functions bug In PHP 4.0 RC 1 running under Windows 2000 / IIS as an ISAPI module: using fread function to obtain contents of a binray file returns only a part of a file. Piece of code I used: <?php $fd = fopen("test.jpg", "r"); $size = filesize("test.jpg"); echo "<br>Filesize is: " . $size; $bdata = fread($fd, $size); $fp = fopen("bla.jpg", "w"); fwrite($fp,$bdata); fclose($fp); fclose($fd); ?> Length of text.jpg is 11755 bytes. After running the code length of bla.jpg is 65 bytes. Tries writing $bdata = fread($fd, filesize("test.jpg")); Didn't work. All examples i found at www.faqts.com use the same way to obtain contents of file. One is found at: http://www.faqts.com/knowledge-base/view.phtml/aid/161/fid/13/lang/ Thanks!

« previous php.dev (#18946) next »