note 55153 added to function.fopen
| From: | edvaldoalmeida at yahoo dot com | Date: | Tue, 26 Jul 2005 17:33:29 +0000 |
| Subject: | note 55153 added to function.fopen | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-92498@lists.php.net to get a copy of this message | ||
I noticed something interesting while using file() to read a huge text file. According to the memory
available and to the record size, it will truncate the file without warnings. So, if you intend to
read a really large text file line-by-line, you should try fgets() instead of file(), rewriting your
loops.
----
Manual Page -- http://www.php.net/manual/en/function.fopen.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+55153
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55153&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55153&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55153&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55153&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55153&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55153&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+55153&report=yes
Search -- http://master.php.net/manage/user-notes.php