Answers for "read file php line by line and write line by line"

PHP
3

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.
}
Posted by: Guest on May-22-2020

Code answers related to "read file php line by line and write line by line"

Browse Popular Code Answers by Language