Home > php教程 > php手册 > php页面消耗内存过大的处理办法

php页面消耗内存过大的处理办法

WBOY
Release: 2016-06-13 11:54:25
Original
1063 people have browsed it

解决办法:

1,修改 php.ini
将memory_limit由 8M 改成 16M(或更大),重启apache服务

2,在PHP 文件中 加入 ini_set(”memory_limit”,”100M”);

注意:为了系统的其它资源的正常使用 请您不要将 memory_limit设置太大,其中-1为不限

3,修改.htaccess 文档(前提是该目录支持.htaccess)
在文档中新增一句:php_value memory_limit 16M(或更大)

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