reading a block of lines in a file using php

后端 未结 5 1511
旧时难觅i
旧时难觅i 2020-12-20 03:16

Considering i have a 100GB txt file containing millions of lines of text. How could i read this text file by block of lines using PHP?

i can\'t use file_get_

5条回答
  •  不知归路
    2020-12-20 04:03

    i think that you have to use fread($fp, somesize), and check manually if you have founded the end of the line, otherwise read another chunk.

    Hope this helps.

提交回复
热议问题