Page 2 of 2

Re: changing file contents using open function.

Posted: 05 May 2008, 02:04
by sli
No no, everyone always second guesses my answers, even then obviously correct ones.

Re: changing file contents using open function.

Posted: 05 May 2008, 11:04
by iamanoob
bin12 wrote:^
what im trying to say is that you didnt get my point. im sorry if your that sensitive. :lol:
ouch, deep inside...
it really does... XD

Re: changing file contents using open function.

Posted: 06 May 2008, 00:19
by sli
bin12 wrote:^
nobody tells you're a noob, what im trying to say is that you didnt get my point. im sorry if your that sensitive. :lol:
Then you didn't explain it well enough. I gathered that you want to open a file, clear the contents of that file, and write to it. That's what I showed you how to do. Unless you want to completely remove and rewrite the file, then you'd use this:

Code: Select all

unlink($file);
open(FILE,">","$file");