dth981485742 2016-02-13 20:10
浏览 28
已采纳

preg_match_all在实时服务器上停止代码执行(大文件)[关闭]

i would like to ask if someone had the same problem or know any workaroundto fix it.

I have a large file (15MB) full of array values which i find and read them. On xampp the code with preg_match_all works correcly (for large and small files).

on the server Current PHP version: 5.5.9 (2 vcpu 2GB ram) preg_match_all stop execution of the code (if i test with small file it gives correct results).

  • 写回答

1条回答 默认 最新

  • dsvs50005 2016-02-13 20:20
    关注

    Try using:

    ini_set('memory_limit','1024M');
    

    In the beginning of the script.

    Also, if you're calling the script from your browser, print an empty space on that loop to keep your browser alive.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 求指导ADS低噪放设计
  • ¥15 CARSIM前车变道设置
  • ¥50 三种调度算法报错 有实例
  • ¥15 关于#python#的问题,请各位专家解答!
  • ¥200 询问:python实现大地主题正反算的程序设计,有偿
  • ¥15 smptlib使用465端口发送邮件失败
  • ¥200 总是报错,能帮助用python实现程序实现高斯正反算吗?有偿
  • ¥15 对于squad数据集的基于bert模型的微调
  • ¥15 为什么我运行这个网络会出现以下报错?CRNN神经网络
  • ¥20 steam下载游戏占用内存