Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php read 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 #file #line #line
ADD COMMENT
Topic
Name
5+1 =