Sometimes write a program when the background requirements to import large amounts of data into the database, such as computer test results of the query, phone book data, etc. are generally stored in Excel, then we can export data into a CSV file, and then through the following procedures can be in the background batch import data into the database.
The following are just the main program sections:
/***************************************** Author: Chong Xing/arcow**************** njj@nuc.edu.cn******************* PHP import CSV file to database ********** Simultaneous calculation of program execution time *********** www.cncms.com*********** ****************************************/ Defining the Get Time function function Getmicrotime () { List ($usec, $sec) = Explode ("", Microtime ()); return (float) $usec + (float) $sec); } ?>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.