Read large files line by line to avoid memory overload.
Source Code
$file = fopen("largeFile.txt", "r");
if ($file) {
while (($line = fgets($file)) !== false) {
echo $line;
}
fclose($file);
} else {
echo "Unable to open file!";
}