PHP reported this error when using Mysql
The translation is that the memory of the size of aaaaaa bytes is exhausted (when trying to allocate bbbbb bytes)
If the value of bbbbb is larger than aaaaa, it means that the memory is small It's not enough anymore. At this time, we need to modify the settings and make the settings larger:
Now record the solution as follows:
1. Modify php.ini (recommended):
Search the memory_limit field in php.ini and modify it, such as
memory_limit = 128M
2. Add the following statement in the programini_set("memory_limit ", "128M");
In fact, there is another situation, that is, the value of bbbbb is much smaller than the value of aaaaa:
At this time, it is not a memory problem, but a program problem. It may be in your program Mysql-related content is not enabled. Please check the authenticity of the code related to the database connection
The above introduces Allowed memory size of aaaaa bytes exhausted tried to allocate bbbbb bytes, including the content. I hope it will be helpful to friends who are interested in PHP tutorials.