Tuesday, April 9, 2013

Display contents of .txt file on page

PHP Code:

<?Php
$file 
$_SERVER['DOCUMENT_ROOT'] . "/text.txt"//Path to your *.txt file 

$contents file($file); 
$string implode($contents);

echo 
$string

?>