duanlieshuang5330 2009-10-31 13:00
浏览 87
已采纳

将大型XML文件加载到mySQL数据库(PHP)

For a new project I need to load big XML files (200MB+) to a mySQL database. There are +- 20 feeds i need to match with that (not all fields are the same).

Now when i want to catch the XML I get this error:

Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 171296569 bytes) in E:\UsbWebserver\Root\****\application\libraries\MY_xml.php on line 21

Is there an easy solution for this? It's not possible to get te feed in parts of a few MB's each.

Thank you very much!

P.s. has somebody an idea to match xml-feeds easy?

  • 写回答

5条回答 默认 最新

  • douhao2721 2009-10-31 13:02
    关注

    This should fix it:

    ini_set('memory_limit', -1);
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?

悬赏问题

  • ¥15 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 R语言卸载之后无法重装,显示电脑存在下载某些较大二进制文件行为,怎么办
  • ¥15 java 的protected权限 ,问题在注释里