We have several CSV files with a lot of records. You must upload these files to the MySQL database using the web interface. These files are collected from various field work and uploaded to the server through a web application. The web application is developed using PHP.
Initially, the number of entries was very small. But now it has become very large, and users were not able to upload the file to the server.
Problems -
- We need to wait for the entire file to load to begin processing.
- We can see data validation errors after downloading the entire file.
- Downloading large files is not supported by default.
- PHP run time is limited.
So, I am looking for a solution to download the contents of a CSV file as a fragment. This will help me process a small amount of data for each request.
My idea is to read data from a CSV file using JavaScript. Then POST this data using AJAX.
Want to see data validation errors for a small amount of data and, if necessary, stop execution.
source
share