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!