It takes a long time to obtain 8000 records from the database and output the records to excel. It should have exceeded the limit of 30 seconds for webpage requests. In this way, data cannot be printed if there are more than one data record? Solution: 1. set_time_limit (0); 2. ob_flush (); flush (); another question: time and memory are simultaneously affected... it takes a long time to obtain 8000 records from the database and output the records to excel. It should have exceeded the limit of 30 seconds for webpage requests. In this way, data cannot be printed if there are more than one data record?
Solution:
1. set_time_limit (0 );
2. ob_flush ();
Flush ();
I will also ask: does the time and memory affect the print output of exel at the same time?
Reply content:
It takes a long time to obtain 8000 records from the database and output the records to excel. It should have exceeded the limit of 30 seconds for webpage requests. In this way, data cannot be printed if there are more than one data record?
Solution:
1. set_time_limit (0 );
2. ob_flush ();
Flush ();
I will also ask: does the time and memory affect the print output of exel at the same time?
Hope to help you: http://www.jianshu.com/p/6d8a99621e8b
You can addSet_time_limit (0 );In order to achieve the goal of not limiting the timeout time
You can use phpexcel to export data.
You need to compress the output content gzip to reduce the amount of content transmitted from the server to the browser.