donglengyuan6826 2016-10-20 06:20
浏览 149

laravel excel导出下载

How to download excel with thousands of rows in laravel 4. I am using Maatwebsite package. I am getting following error.

[2016-10-20 11:22:00] local.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Allowed memory size of 524288000 bytes exhausted (tried to allocate 4194304 bytes)' #0 [internal function]: Illuminate\Exception\Handler->handleShutdown() #1 {main} [] []

I have set

ini_set('max_execution_time', 2000);
ini_set('memory_limit', '2000M');
  • 写回答

1条回答 默认 最新

  • dotif64826 2016-10-20 06:52
    关注

    Try:

    ini_set('max_execution_time', 0);
    ini_set("memory_limit",-1);
    

    But this is a hack. You should find out some way to reduce the time and memory your script is taking. There is always chance that things can be optimized.

    评论

报告相同问题?

悬赏问题

  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了
  • ¥50 切换TabTip键盘的输入法
  • ¥15 可否在不同线程中调用封装数据库操作的类
  • ¥15 微带串馈天线阵列每个阵元宽度计算
  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据