Home > Backend Development > PHP Problem > How to set file upload size in php

How to set file upload size in php

王林
Release: 2023-03-03 18:22:01
Original
4413 people have browsed it

How to set the file upload size in php: first open the php.ini configuration file; then find the upload_max_filesize configuration; finally modify the value of the configuration to 8M, that is, the maximum allowed upload file size is 8M.

How to set file upload size in php

First open the php.ini configuration file, and then configure it as follows:

(Recommended tutorial: php graphic tutorial

1. file_uploads = on ;

Whether to allow file uploading via HTTP switch, the default is ON;

2. upload_tmp_dir;

Files are uploaded to the place where temporary files are stored on the server. If not specified, the system default temporary folder will be used;

3. upload_max_filesize = 8m;

Maximum file size allowed to be uploaded Value, the default is 2M;

(Video tutorial recommendation: php video tutorial)

4. post_max_size = 8m;

refers to the form POST The maximum value that PHP can receive, including all values ​​in the form, defaults to 8M;

Generally, after setting the above four parameters, uploading a file of

The above is the detailed content of How to set file upload size in php. For more information, please follow other related articles on the PHP Chinese website!

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