Ciao a tutti, chi mi dice cosa c'è che non va in questo codice?





<form action="" method="post">
Scrivi quello che vuoi appaia in 'Notizie':
<input type='text' name='notizie' maxlength='10'/>
<input type='submit' name='salva' value='Salva!' />
</form>

<?php

$documento = fopen ("aaa.txt" , "w");
@$testo = $_POST['notizie'];
if(isset($_POST['salva'])) {
fwrite ($documento, $testo);
fclose ($documento);
}
?>

vorrei che le cose scritte dentro l'input "notizie" vengano scritte su un file txt