newbie file script

From: Date: Mon, 09 Feb 2004 03:01:52 +0000
Subject: newbie file script
Groups: php.windows 
Request: Send a blank email to php-windows+get-22773@lists.php.net to get a copy of this message
hey guys - I'm sure this is old school problems but without any environment variables can you tell me if I'm doing something wrong?? thanks. I've been working on a listing that you can add titles to - so that I can add a title and an auto link to the file with the new update. Basically, the main text goes into one file, and then title and the link to that file *should* go to listing.html - posted from the top down. Although, every time I run through it - it overwrites the uppermost title with the new one. All the older titles stay the same, just the first X chars of the file are replaced with submitted X title chars. I'm using fopen with r+. Is there anything about r+ that would not add text to the very beginning of a file? Should I get the files contents, add to them, and then write back to the file? Right now I'm just going fopen, fwrite, fclose. Hoping to add text to the beginning of a file without replacing the current contents. Script/more info avail if needed. Thanks! Stephen Rivas Jr

« previous php.windows (#22773) next »