search

Home  >  Q&A  >  body text

Use php to merge csv with the same format

For example, folder a contains 1.csv, 2.csv, and 3.csv, and folder b contains 2.csv, 3.csv, and 4.csv. The csv formats in folders a and b are the same.
How can I use php to combine folders a and b into a new folder c, and merge csv files with the same names of a and b.
Expected results: There are 1.csv, 2.csv, 3.csv, 4.csv in the c folder, including 2. The contents in csv and 3.csv are the merged contents of 2 and 3 in folders a and b.

bugbug2560 days ago1384

reply all(3)I'll reply

  • PHP中文网

    PHP中文网2018-02-08 10:21:41

    http://www.php.cn/xiazai/leiku/1278 Take a look at this class

    reply
    0
  • bug

    Local download, file not found. I would like to ask if you can do it with a few lines of code.

    bug · 2018-02-08 10:50:25
  • Cancelreply