How to modify the upload size configuration in php.ini: 1. Enable HTTP upload file configuration and specify the temporary file storage location; 2. Modify the upload file size configuration and the maximum form reception value; 3. Restart the server.
The operating environment of this article: windows10 system, php 7, thinkpad t480 computer.
Let us take a look at the specific steps to modify the upload file size configuration:
1. Open php.ini
1. file_uploads = on ;
Whether to allow file upload via HTTP switch, the default is ON;
2. upload_tmp_dir;
The file is uploaded to the place where temporary files are stored on the server. If it is not specified, it will Use the system's default temporary folder;
3.upload_max_filesize = 8m;
Wangwen business, that is, the maximum allowed file size for uploading, the default is 2M;
4 .post_max_size = 8m;
refers to the maximum value that can be received through POST to PHP through the form, including all values in the form, the default is 8M;
Generally, set the above four After setting the parameters, uploading files of
2. Restart the php service to make the configuration take effect
service php-fpm restart systemctl restart php-fpm
Recommended learning: php training
The above is the detailed content of How to modify the upload size configuration in php.ini. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Notepad++7.3.1
Easy-to-use and free code editor

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 Mac version
God-level code editing software (SublimeText3)

SublimeText3 English version
Recommended: Win version, supports code prompts!
