📜  php 逐行读取大文件 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:49.993000             🧑  作者: Mango

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

    fclose($handle);
} else {
    // error opening the file.
}