Overwrite file when $file_exists PHP

how do I overwrite file when $file_exists ?

just fopen it in the right mode
or unlink it first
right mode?


if you get permission denied, you'll need to change the permissions on it
isset($file_exists) ?
php.net/fopen
fopen($file,"r")
will take care?
fopen will blow away any existing file by default anyway
no. read the documentation
unless it can't - which means php can't do anything about it
just fopen it in the right mode
what the heck is right mode?
write you mean?
tjcombos, yes
no, he means proper
"the right"
THE
read the freakin' docs
there's a big grid
php.net/fopen
shows all the different modes with a nice explanation
he means open it in the "write" mode :)
the right mode for you is the write mode

*
To prove that you're not a bot, enter this code
Anti-Spam Image

Leave a Comment

You must be logged in to post a comment.


Blog Tags:

Similar posts: