Confused about fopen r+ mode

From: Date: Thu, 14 Dec 2000 15:29:07 +0000
Subject: Confused about fopen r+ mode
Groups: php.general 
Request: Send a blank email to php-general+get-30299@lists.php.net to get a copy of this message
Hi list, I get confused after reading your messages and the tutorials on the r+ mode for the fopen() function. I quote from the book Professional PHP Programming: " r+ open a file for reading and writing. Data will be written to the beginning of an existing file". Doesn't this mean data will be inserted to the beginning of the file and push the original part down? Thanks for any answer. Best regards, Patricia --------------original messages: maybe this: rename(file, tmp) fopen -W fopen -A (tmp) unlink (temp) I listed that in the way I though, not the exact syntax, just giving you an idea. Cheers, Maxim Maletsky -----Original Message----- From: Police Trainee [mailto:policetrainee@yahoo.com] Sent: Thursday, December 14, 2000 2:11 PM To: PHP Subject: [PHP] Appending the start of a file? Is there a simple way to append a file starting from the beginning and pushing everything else down? fopen()in mode W erases everything first, and in mode A appends to the bottom. So what is a simple man to do? thanks in advance -mark _____________________________________________________________________________________ Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com

« previous php.general (#30299) next »