currently I am using (which opens the text file in the browser):
Code: Select all
header("Content-type: text/plain");
header("Content-Disposition: inline; filename=somefile.txt");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Pragma: public");
readfile($FilePath);