$file = 'document.txt';
if (file_exists($file)) {
$content = file_get_contents($file);
echo nl2br(htmlspecialchars($content));
}