How to deal with excessive memory consumption in PHP pages_PHP tutorial

WBOY
Release: 2016-07-21 15:12:21
Original
697 people have browsed it

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...
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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!