Home >Backend Development >PHP Tutorial >php memory limit
I used file_get_contents when uploading files and reported an error:
<code>Allowed memory size of 134217728 bytes exhausted (tried to allocate 169854368 bytes)</code>
It turns out that there is a configuration item in php that is used to control the maximum memory parameter
<code>memory_limit = 1024M</code>
Just adjust this parameter.
I used file_get_contents to report an error when uploading files:
<code>Allowed memory size of 134217728 bytes exhausted (tried to allocate 169854368 bytes)</code>
It turns out that there is a configuration item in php that is used to control the maximum memory parameter
<code>memory_limit = 1024M</code>
Just adjust this parameter.
The original poster has the right answer.
That’s right. . . You can also set this value at the beginning of the method body
Be familiar with the basic configuration of the php.ini file