Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php read big file line by line

$handle = fopen("inputfile.txt", "r");
if ($handle) {
    while (($line = fgets($handle)) !== false) {
        // process the line read.
    }

    fclose($handle);
} else {
    // error opening the file.
} 
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #read #big #file #line #line
ADD COMMENT
Topic
Name
8+1 =