PHP script to import csv data into mysql

前端 未结 4 612
囚心锁ツ
囚心锁ツ 2020-12-23 11:03

I have tried the following code but getting some errors. Here I can read the input file but I am getting the following error:Deprecated: Function split() is deprecated in C:

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-23 11:31

    I think you need to convert CSV file in collection first. After that you can add loop and call insert queries to insert data.

    Here you will get code to convert CSV file into collection array. best-way-to-upload-and-read-csv-file-in-php

提交回复
热议问题