Codeigniter phpexcel 大小的单元格分配内存


Codeigniter phpexcel size of cells allocated memory

我们如何增加 excel 文件中单元格的内存分配大小以忽略以下错误:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 54 bytes)

虽然我们把说明放在下面: (init_set(...,'3072M')

如何在脚本执行期间减小分配内存大小?

要么增加内存,要么使用单元格缓存,或者在从数据库中读取每一行时将每一行处理到 PHPExcel 中,而不是从数据库加载所有内容,然后将其全部处理到 PHPExcel 中。