seems like a one of thing so you don't need to use php, just delete it or empty it with a text editor, on the server assuming *nix you can use touch. If you really want to do it with php
unlink ('file.txt');file_put_contents('file.txt','');
or fopen ..