$filename = $_SERVER["SCRIPT_FILENAME"]; $filename = str_replace(".php", ".txt", $filename); if(file_exists($filename)) { $string = file_get_contents($filename); echo(wordwrap($string,80)); } ?>