note 103005 added to function.fopen
| From: | hpjc dot revolutionx at web dot de | Date: | Sat, 19 Mar 2011 16:13:13 +0000 |
| Subject: | note 103005 added to function.fopen | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-178015@lists.php.net to get a copy of this message | ||
I've a problem with r+! when I'm using it, it wouldnd write over my file! I need a
function that does not add a file but can write over it!
I'm using
if(file_exists("data.txt")) {
$i = fopen("data.txt", "w");
}
but this isn't looking good!
how do I overwrite only?
Window 7 / xampp
----
Server IP: 69.147.83.197
Probable Submitter: 78.42.141.140
----
Manual Page -- http://www.php.net/manual/en/function.fopen.php
Edit -- https://master.php.net/note/edit/103005
Del: integrated -- https://master.php.net/note/delete/103005/integrated
Del: useless -- https://master.php.net/note/delete/103005/useless
Del: bad code -- https://master.php.net/note/delete/103005/bad+code
Del: spam -- https://master.php.net/note/delete/103005/spam
Del: non-english -- https://master.php.net/note/delete/103005/non-english
Del: in docs -- https://master.php.net/note/delete/103005/in+docs
Del: other reasons-- https://master.php.net/note/delete/103005
Reject -- https://master.php.net/note/reject/103005
Search -- https://master.php.net/manage/user-notes.php