html - PHP ReadFile Outputs an Indent? -
i'm using php code import text file html document. reason because i'm having page refresh every often, text new. here code: <!doctype html> <head> <meta http-equiv="refresh" content="5"> </head> <body> <xmp> <?php $date = date("y-m-d"); $file = "..\\chat logs\\$date.txt"; readfile($file); ?> </xmp> </body> </html> the $date.txt file has no special spacing. no indents. problem first line has output: [ 00:57:45 ] : <overlord> enemy spotted [ 01:00:51 ] : <shadowlordgamin> hi [ 01:00:58 ] : <shadowlordgamin> got game today :d [ 01:06:42 ] : <brazdnt> d: is there way remove initial indentation? appreciated. thanks. first off, <xmp> deprecated , badly supported. should use <pre> instead , escape text using htmlspecialchars() (which requires read text file_get_con...