php 中sql 查 询 会 抛 出 错 误 :Fatal error : Allowed memory size of 67108864 bytes exhausted (tried to allocate 4488 bytes ) 你的服务器/空间问题。设置服务器或找空间商修改: PHP对脚本记忆体空间限制的

php中sql查询会抛出错误:Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 4488 bytes) 

 你的服务器/空间问题。设置服务器或找空间商修改:

Fatal error: Allowed memory size of * bytes exhausted (tried to allocate bytes)  第1张

PHP对脚本记忆体空间限制的缘故。默认设定为 8MB,而有些以前的脚本,会要求使用超过 8MB 的内存空间,只要加大 8MB 的使用限制即可。

加大 8MB 内存使用限制,方法有二,选其一即可:

方法一(推荐):修改 php.ini 里的 memory_limit 的设置值 8M 改为 120M:memory_limit = 120M

方法二:在最上层的 PHP Script,加入一行:ini_set("memory_limit","120M");

注:如果扩大到 120M 仍然相同的错误发生,则再加大 120M 限制。

转载请说明出处
知优网 » Fatal error: Allowed memory size of * bytes exhausted (tried to allocate * bytes)

发表评论

您需要后才能发表评论