<?php $myfile = "./test.txt"; $openfile = fopen ($myfile, "r") or die ("Couldn't open the file"); $file_size=filesize($myfile); $file_content = fread ($openfile, $file_size); fclose ($openfile); echo $file_content; ?>