There are many solutions. Below I will introduce them according to the webmasters with different permissions
Have server management rights to modify the php.ini file
You can directly increase memory_limit = 8M in php.ini; to 12M or more. (Note: M is followed by M, not MB)
No server management rights
1. Directly modify the memory in php, but your php needs to support the ini_set function. If this function is prohibited from being used in php.ini, then this method will be invalid.
ini_set('memory_limit','12M');//Of course it can be set to a larger value
2.htaccess method, this kind of general space host supports
Create a .htaccess file in the root directory and add the following content:
php_value memory_limit 20000000
Note: Generally speaking, 8M is the standard, but sometimes 8M is not enough.
Friendly reminder: Fatal error: Allowed memory size of 8388608 bytes exhausted. Indicates that the configured memory_limit value is 8M. The solution is also solved by the method introduced above. The memory_limit value needs to be debugged little by little