Codice PHP:
<?php $file=(isset($_GET['txt']))?$_GET['txt']:"default";
                          
$risorsa "testo/$file.txt";
                          
$string file_get_contents($risorsa);
                          echo 
nl2br(htmlentities($stringENT_QUOTES));
                          
?>
L'argomento ENT_QUOTES è opzionale ma utile per poter convertire anche gli apici (in caso di interazione col DB) in entità HTML.