In addition, let’s introduce the method of setting the runtime memory size in PHP. If the following error occurs when the php program is running: Fatal error: Allowed memory size of 20971520 bytes exhausted (tried to allocate 7325604 bytes) in … (The available memory is 20971520 bytes, try to allocate...) It means that the memory allocated during runtime is not enough. At this time, it is necessary to increase the memory to support PHP operation. Solution: 1. Dynamically allocate memory in php program @ini_set(‘memory_limit’,’60M‘); //Modify 60M2. Configuration in php.ini memory_limit = 20M //Modify 20MThat’s all. I remember my boss once said, I believe in your technical level. If you encounter a problem that is very difficult to solve, just give full play to the advantages of the hardware. Haha, then add more memory, more CPU, or more. A higher configuration machine. |