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

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

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

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