read a file by line

<?php
 
$filename = "/path/to/some/file";
 
$fh = fopen($filename, "r");
 
if( !$fh )
	exit("failed to open file\n");
 
while( $line = fgets($fh) )
	echo $line;
 
fclose($fh);
 
?>

See Also