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 R语言卸载之后无法重装,显示电脑存在下载某些较大二进制文件行为,怎么办
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?
  • ¥15 关于#vue.js#的问题:修改用户信息功能图片无法回显,数据库中只存了一张图片(相关搜索:字符串)
  • ¥15 texstudio的问题,
  • ¥15 spaceclaim模型变灰色
  • ¥15 求一份华为esight平台V300R009C00SPC200这个型号的api接口文档
  • ¥15 字符串比较代码的漏洞
  • ¥15 欧拉系统opt目录空间使用100%
  • ¥15 ul做导航栏格式不对怎么改?