o così...a me piace di +
codice:<html> <head> <title>Programma php</title> </head> <body> <? if ($_POST['mostra']==1) { $file=file("testoscritto.txt"); $max=count($file); for ($i=0; $i<=$max; $i++) echo 'Riga '.$i.': '.$file[$i]; } else { ?> <form method="POST"> <input type="hidden" value="1" name="mostra"> <input type="submit"> </form> <? } ?> </body> </html>