Friday, October 2, 2009

Read From File - PHP

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

1 comment:

Unknown said...

A simple code is applied to read data from the file. Outsourcing