note 25642 added to function.fopen
| From: | klaus dot porsch at loewe dot de | Date: | Tue, 01 Oct 2002 13:00:34 +0000 |
| Subject: | note 25642 added to function.fopen | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-37462@lists.php.net to get a copy of this message | ||
I wanted to use
$fp=fopen("$datei","w+");
to first read a countnumber and
secondly rewrite it increased of one.
But as soon as you use w(+), your logfile is written new.
So I had to write first another filehandle for reading the logfile.
I ask myself: "What's the sense of '+' behind w ?
--
http://www.php.net/manual/en/function.fopen.php
http://master.php.net/manage/user-notes.php?action=edit+25642
http://master.php.net/manage/user-notes.php?action=delete+25642
http://master.php.net/manage/user-notes.php?action=reject+25642