Tuesday, May 12, 2009

Load Text Files - PHP

function LoadTxt($fn)
{ global $ewPathDelimiter;

// Get text file content
$filepath = realpath(".") . $ewPathDelimiter . $fn;

$fobj = fopen ($filepath , "r");
return fread ($fobj, filesize ($filepath));
}

Disclaimer: Any code or advice given is for instructional purposes only. We will not be responsible for any loss or damage caused by using this script.

No comments: