Is fopen() limited by the filesystem?

前端 未结 4 1205
执笔经年
执笔经年 2021-01-13 14:04

I wrote a program to generate large .SQL files for quickly populating very large databases. I scripted it in PHP. When I started coding I was using fopen()

4条回答
  •  独厮守ぢ
    2021-01-13 14:54

    You can write more than 2GB of data in a stream, not in a file (as the fseek internal pointer of the file is exceeding PHP limits, and streams are not usually seekable)

    test.tar', 'w'); //this is a stream, no limitation here $body = str_repeat("===", 1024 * 1024); while(true) fwrite($target, $test);

提交回复
热议问题