Home > Backend Development > PHP Tutorial > php memory limit

php memory limit

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-08-18 09:16:30
Original
1099 people have browsed it

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>
Copy after login
Copy after login

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>
Copy after login
Copy after login

Just adjust this parameter.

Reply content:

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>
Copy after login
Copy after login

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>
Copy after login
Copy after login

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

Related labels:
php
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template