Home > php教程 > php手册 > PHP提示:Fatal error: Allowed memory size of

PHP提示:Fatal error: Allowed memory size of

WBOY
Release: 2016-06-13 09:15:52
Original
1202 people have browsed it

PHP提示:Fatal error: Allowed memory size of

  出现"Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 775920 bytes)"这种错误,首先要先检查你的php程序是否出现了死循环。

  解决办法(三种):

  一、修改php.ini(推荐)

  memory_limit = 12M

  二、在程序里面添加如下语句

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

  三、在根目录建立

  .htaccess文件,添加如下内容

  php_value memory_limit 12M

  如果还不能解决,就把它改得再大一些。

 

  最后注意的是重启服务器。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template