Concatenate files in PHP

前端 未结 5 1223
感情败类
感情败类 2021-02-07 18:49

I\'d like to know if there is a faster way of concatenating 2 text files in PHP, than the usual way of opening txt1 in a+, reading txt2 li

5条回答
  •  醉梦人生
    2021-02-07 19:01

    $content = file_get_contents("file1");
    file_put_contents("file2", $content, FILE_APPEND);
    

提交回复
热议问题