|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-04-18 06:30 UTC] kalle@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 08 05:00:01 2026 UTC |
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