Simple old function to load a file into a string.
$s = loadStrFile("file.txt");
function loadStrFile($filename) {
$handle = fopen ($filename, "rb");
$contents = fread ($handle, filesize ($filename));
fclose ($handle);
return $contents;
}
Related posts:

January 6th, 2010 7:39 pm
Really nice blog, nice snippet codes, thx 4 sharing