note 50533 added to function.fopen

From: Date: Wed, 02 Mar 2005 22:04:57 +0000
Subject: note 50533 added to function.fopen
Groups: php.notes 
Request: Send a blank email to php-notes+get-85824@lists.php.net to get a copy of this message
Hi! Would consider myself a beginner at PHP. Am writing a very simple guestbook. Messages are simply stored in .txt-file which the guestbook script reads through when entering the site. My problem is how to be able to append messages in the beginning of the file without overwriting existing messages. Now, the latest added message is added at the end of the file and therefor also at the bottom of the guestbook. Have tried with the different parameters w, a, and r+ when the script opens the file. Is this solvable or should I start to think about using a database? Thankful for any help at all. ---- Manual Page -- http://www.php.net/manual/en/function.fopen.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+50533 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50533&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50533&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50533&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50533&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50533&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+50533&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#85824) next »