">
当前位置:Gxlcms > PHP教程 > php逐行读取文件示例

php逐行读取文件示例

时间:2021-07-01 10:21:17 帮助过:19人阅读

  1. $handle = @fopen("/tmp/inputfile.txt", "r");
  2. if ($handle) {
  3. while (!feof($handle)) {
  4. $buffer = fgets($handle, 4096);
  5. echo $buffer;
  6. }
  7. fclose($handle);
  8. }
  9. ?>

人气教程排行