Page 1 of 1
Help required for Creation/Deletion/Append of Files in php
Posted: Wed Jul 24, 2002 10:37 am
by umesh

I require help for php listings as i am unable to append/delete files on apache server under linux. I tried unlink for deletion and fwrite "w+" for append. Will u be able to help me
Posted: Wed Jul 24, 2002 10:51 am
by cwcollins
Hey,
please provide a little more information. are you getting an error? what error? do you have permission to madofy the file(s) your're trying to work with?
Posted: Wed Jul 24, 2002 12:24 pm
by gnu2php
One thing to note is that 'a' (or 'a+', for read-append) is the mode used to append files--not 'w+', which opens for read-write, but first erases all the data.
Permission
Posted: Thu Jul 25, 2002 11:01 am
by musashi
Umesh, check your file permissions too. Gnu2php is right, though. "w+" will delete the contents of the file the moment you use fopen.