Batch data import method that can be implemented using php
某草草
某草草 2017-05-24 11:34:00
0
2
567

Now we encounter a requirement to import employee data in batches.
The structure is:
Employee photo, Employee name, Employee position, Company
andOne employee is only allowed one employee photo, One employee belongs to one company, One employee is only allowed one position. The target data volume is 200. Now we need to use PHP to import this data into the database in batches and display it in the front desk.
I have tried to use PHPExcel to read xlsx table files before, but the pictures in xlsx do not belong to any cell, and the corresponding relationship between employee photos and employees cannot be determined. .
I hope you can help point out a suitable solution, thank you very much!

某草草
某草草

reply all(2)
为情所困

ajax can do it.
Encapsulate form data upload through the formData object (lower version browsers are not compatible, check compatibility at http://caniuse.com/#search=fo...)

世界只因有你

First of all, the photos must be imported in the second step
Secondly, you can save the photos into a folder, but the photo names must correspond to the employees (for example, the photo of employee No. 1 in excel is 1.jpg, and the photo of No. 2 is 2.jpg ) No matter what method you use, there must be at least a corresponding relationship. If the picture is stored in excel, I think there should be this corresponding relationship.
The first step is to import other employee data to prevent errors in the corresponding relationship. You can also save the serial number in the database.
After importing, import the picture according to the corresponding relationship.
The third step is to delete the serial number field!
If I can do it, it’s just these steps anyway
There must be a corresponding relationship between the photos and employees

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!