Salve a tutti, come faccio a cancellare il contenuto di un file txt presente su hd?? vorrei che il file fosse vuoto.. grazie anticipatamente..
Salve a tutti, come faccio a cancellare il contenuto di un file txt presente su hd?? vorrei che il file fosse vuoto.. grazie anticipatamente..
Codice PHP:
$filename = "test.txt";
if
(
is_writable($filename) AND
$handle = fopen($filename, 'w')) AND
fwrite($handle, "") AND
fclose($handle)
)
echo("ok");
else
echo("errore");
-10 points to SCLERO high top class [definition of SCLERO HIGH TOP CLASS: 90 random kills]