note 44702 added to function.ftruncate
| From: | latet at poczta dot onet dot pl | Date: | Fri, 13 Aug 2004 18:01:32 +0000 |
| Subject: | note 44702 added to function.ftruncate | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-79850@lists.php.net to get a copy of this message | ||
I want to report:
on Apache/2.0.48 (Linux/SuSE), PHP Version 4.3.3.
It is very different in "a" and in "r" modes.
After fopen in "a" mode, I don't have to fseek before ftruncate ($fp, 0) and even
between ftruncate and the following fputs (if I need to write to the begining of the file).
But if I open in "r" mode and read some bytes, and then I want to ftruncate ($fp, 0) and
write again - I do need to put fseek($fp, 0); just after ftruncate ($fp, 0).
Latet
----
Manual Page -- http://www.php.net/manual/en/function.ftruncate.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+44702
Delete -- http://master.php.net/manage/user-notes.php?action=delete+44702&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+44702&report=yes
Search -- http://master.php.net/manage/user-notes.php