Home>Article>Backend Development> What to do if php exceeds memory

What to do if php exceeds memory

hzc
hzc Original
2020-06-10 14:03:33 3808browse

What to do if php exceeds memory

The solution to php exceeding memory is:

There are two methods

Method 1: Modify php.ini The size of memory_limit, but this requires relevant server permissions.

Whether php -r "echo ini_get('memory_limit')" takes effect

Method 2: php -d memory_limit=-1 The script you want to execute

php related introduction :

PHP is "Hypertext Preprocessor" and is a general open source scripting language. PHP is a scripting language executed on the server side. It is similar to C language and is a commonly used website programming language. PHP's unique syntax mixes C, Java, Perl, and PHP's own syntax. It is conducive to learning and widely used. It is mainly suitable for the field of web development.

Recommended tutorial: "php tutorial"

The above is the detailed content of What to do if php exceeds memory. For more information, please follow other related articles on the PHP Chinese website!

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