<?
$text= file_get_contents( $file );
$text= htmlspecialchars($text);
#TODO: flow-text (txt) vs. pre-text (code)
#$text= preg_replace('/(^|\n\n|\r\r|\r\n\r\n|<p>)(.*?)($|\n\n|\r\r|\r\n\r\n)/s','<p>\2</p>', $text);
#$text= preg_replace('/\r\n|\n|\r/s','<br/>'."\n", $text);
#$text= preg_replace('!</p>!s','</p>'."\n", $text);
?>
<pre class='codebox'>
<?= $text ?>
</pre>textview.php
application/x-php, 373 bytes (load raw)

