[thelist] clear a text file using php?

sasha spam at bittersweet2.com
Mon Dec 30 15:24:01 CST 2002


On Mon, 30 Dec 2002 13:14:57 -0800 (PST), Tom Dell'Aringa
<pixelmech at yahoo.com> wrote:

> I have a text file on my server that I am writing some data to. I
> want to completly clear out the text file BEFORE I write to it (erase
> whatever is there). Is there a way to do this? I'm using php.
>
> TIA
>
> Tom
>
> =====
> var me = tom.pixelmech.webDeveloper();
>
> http://www.pixelmech.com/
> http://www.maccaws.com/
> [Making A Commercial Case for Adopting Web Standards]
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com

http://www.php.net/manual/en/function.fopen.php

I believe option w or w+ will do it for you.

--
sasha



More information about the thelist mailing list