Possible Duplicate:
How do i purge the contents of a text file in php
Hi..
How can I erase all the data stored (make blank) in my text file myfile.txt
using php??
In PHP, we can delete any file using unlink() function.
PHP's file_put_contents()
should be usefull in this case. Here's some example code:
file_put_contents('myfile.txt', '');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With