#43727 [Opn->Csd]: An addition to fwrite
| From: | kalle@php.net | Date: | Fri, 18 Apr 2008 06:30:06 +0000 |
| Subject: | #43727 [Opn->Csd]: An addition to fwrite | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-724@lists.php.net to get a copy of this message | ||
ID: 43727
Updated by: kalle@php.net
Reported By: rc at opelgt dot org
-Status: Open
+Status: Closed
Bug Type: Documentation problem
Operating System: irrelevant
PHP Version: Irrelevant
-Assigned To:
+Assigned To: kalle
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Previous Comments:
------------------------------------------------------------------------
[2008-01-02 08:38:15] rc at opelgt dot org
Description:
------------
It would be nice to mention that fwrite - here after fopen('w') - moves
the pointer. So two times writing results in appending what is written,
not replacing.
Reproduce code:
---------------
<?php
$datei = 'test.txt';
$dh = fopen($datei,'w');
flock($dh,LOCK_EX);
fwrite($dh,'1');
fwrite($dh,'23');
fclose($dh);
?>
Expected result:
----------------
Content of test.txt:
23
Actual result:
--------------
Content of test.txt:
123
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43727&edit=1