note 29452 added to function.filesize
| From: | swbrown at ucsd dot edu | Date: | Fri, 14 Feb 2003 00:35:34 +0000 |
| Subject: | note 29452 added to function.filesize | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-43904@lists.php.net to get a copy of this message | ||
Be very careful to include clearstatcache() before any call to filesize()! I just finished
debugging a really painful bug to find that was due to reading in a file like 'fread($file,
filesize(...))', writing it out, then later reading it in the same way. filesize() was cached,
so in some cases, the data was truncated!
--
http://www.php.net/manual/en/function.filesize.php
http://master.php.net/manage/user-notes.php?action=edit+29452
http://master.php.net/manage/user-notes.php?action=delete+29452
http://master.php.net/manage/user-notes.php?action=reject+29452