php 中允许的内存大小为 33554432 字节(尝试分配 43148176 字节) [英] Allowed memory size of 33554432 bytes exhausted (tried to allocate 43148176 bytes) in php
本文介绍了php 中允许的内存大小为 33554432 字节(尝试分配 43148176 字节)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
出现此错误消息,有什么建议吗?
This error message is being presented, any suggestions?
允许的内存大小为 33554432 字节耗尽(尝试分配43148176 字节)在 php 中
Allowed memory size of 33554432 bytes exhausted (tried to allocate 43148176 bytes) in php
推荐答案
终于找到答案了:
只需在 php 文件中出现错误的行之前添加此行
Just add this line before the line where you get error in your php file
ini_set('memory_limit', '-1');
它将占用服务器的无限内存使用量,它工作正常.
It will take unlimited memory usage of server, it's working fine.
考虑使用 '44M'
而不是 '-1'
以安全使用内存.
Consider '44M'
instead of '-1'
for safe memory usage.
这篇关于php 中允许的内存大小为 33554432 字节(尝试分配 43148176 字节)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文