you can simply delete the file and use touch() to create a new empty one.
http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=160
Sincerely
berber
Visit http://www.weberdev.com Today!!!
To see where PHP might take you tomorrow.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 20, 2001 8:47 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Can you make a file empty?
Hi!
I am trying to delete all text in a file.
$yourfile = "file.txt";
$fp = fopen($yourfile,w)
"is there any good code to put in here?"
fclose($fp);
Thanks for any help.
Regards
Jan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]