|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-10-06 14:14 UTC] nicos@php.net
on some of my code I use the following: $fd=fopen($filename,"rb"); echo fread($fd,filesize($filename)); fclose($fd); It looks fread is limited to a certain value. I can't get more than a certain size. With bigs files, I dont get all of them but just a part so I had to use fgets. Can someone check if something changed on the fread()'s function that would limit it? PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 21:00:01 2025 UTC |
Reopened this bug. readfile() on 4.0, 4.2.4-dev and latest CVS-snapshot (13-Oct-2002 03:27) won't work with large files in Windows. Even $ptfp=fopen($ipoc_passthru_fn,"rb"); while(!feof($ptfp)) { print fread($ptfp,4096); } fclose($ptfp); won't work. Files <100k work fine, larger don't. This error is reproductive on various computers with different Windows-Systems and occurs while trying to pass through PDF-files.I got a similar problem with : apache 1.3.27 PHP 4.2.3 Os : Win NT 4 I do : $fp = @fopen($localfile, "rb"); while (!feof($fp)) { fwrite($file2,fread($file1, filesize($localfile))); } The size are differents on some test file (not all) When the probleme occured the dest file is all the time smaller than the source file ... } fclose($fp);Sorry, you said just read the whole file. What should I do when the file is already bigger than the memory_limit? What's wrong in the following code? $fpWrite = @fopen($localfile, "wb"); $fpRead = @fopen($localfile, "rb"); while (!feof($fpRead)) { fwrite($fpWrite, fread($fpRead, 1024)); } fclose($fpWrite); fclose($fpRead);