#############################################################################
# Function to Read contents of a text file
# Usage: $objClass->fnReadFromFile('filename.txt');# ############################################################################
function fnReadFromFile($sFileName)
{
$sReturn = '';
$fHandle = fopen($sFileName, "r");
while (!feof($fHandle))
$sReturn .= fread($fHandle, 4096);
fclose($fHandle);
return($sReturn);
}
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.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment