How to fix memory getting exhausted with PHPExcel?

前端 未结 8 522
被撕碎了的回忆
被撕碎了的回忆 2020-11-28 04:43

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 1078799 bytes) in D:\\xampplite\\htdocs\\Scraper\\PHPExcel\\Reader\\Exc

8条回答
  •  长情又很酷
    2020-11-28 05:11

    Just because the data file is only X bytes, doesn't mean it uses X bytes of ram. For example only 4K of data in a $_SESSION array uses 64K of ram when loaded up. It just depends what the code is doing with that data. The correct answer is to increase the amount of ram.

    Also if this is a XLSX file, they are ZIP'd XML documents. Text files zip up far tighter than 1/2, so your 350K XLSX file is easily a 1MB Excel file.

提交回复
热议问题