Thinkphp exports data in phpExcel, but data cannot be exported.

Source: Internet
Author: User
My framework is Thinkphp. I use phpExcel to export data. I can export only about 500 data records. If I increase the number, the memory will overflow. Because the exported data is not in a data table and multiple tables need to be recycled, do you have any good solutions, or what does phpExcel need to be configured to solve this problem? My framework is Thinkphp. I use phpExcel to export data, and I can export only 500 data records. When I increase the number, the memory will overflow. Because the exported data is not in a data table and multiple tables need to be recycled, do you have any good solutions, or what needs to be configured in phpExcel to solve this problem?

Reply content:

My framework is Thinkphp. I use phpExcel to export data. I can export only about 500 data records. If I increase the number, the memory will overflow. Because the exported data is not in a data table and multiple tables need to be recycled, do you have any good solutions, or what needs to be configured in phpExcel to solve this problem?

Let's take a look at the maximum storage modification of php.

My solution is to export data in segments. However, if you have 500 records, you should optimize the code for memory overflow. You need to add an index to the fields that are queried multiple times.

Https://segmentfault.com/q/1010000004388...

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.