php memory limit

WBOY
Release: 2016-08-18 09:16:30
Original
1014 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
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!