Is there any way to remove the contents of an file in php, do we have any php command that does that, I know unlink but I do not want to delete the file instead
unlink
Try file_put_contents($filename, "");
or
unlink($filename); touch($filename);