hi
please with php how to delete the content of file after opening it
$myTextFileHandler = @fopen("data.xml","r+");
$txtfileArray = @file("data.xml");
Printable View
hi
please with php how to delete the content of file after opening it
$myTextFileHandler = @fopen("data.xml","r+");
$txtfileArray = @file("data.xml");
opening the file in write mode should delete the contents of the file
If it is already open you should close it first withPHP Code:
$fp = fopen("myfile", w);
fclose($fp);
fclose($filePointer);