Home >Backend Development >PHP Tutorial >How to deal with excessive memory consumption in PHP pages_PHP tutorial

How to deal with excessive memory consumption in PHP pages_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:12:21757browse

Solution:

1. Modify php.ini
change memory_limit from 8M to 16M (or larger), restart the apache service

2. Add ini_set("memory_limit", "100M");

in the PHP file

Note: For the normal use of other system resources, please do not set the memory_limit too large, where -1 means no limit

3. Modify the .htaccess document (provided the directory supports .htaccess)
Add a sentence in the document: php_value memory_limit 16M (or greater)

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/326727.htmlTechArticleSolution: 1. Modify php.ini to change memory_limit from 8M to 16M (or larger), restart apache Service 2, add ini_set("memory_limit","100M") in the PHP file; Note: for...
Statement:
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