Home  >  Article  >  Backend Development  >  php file upload configuration maximum value

php file upload configuration maximum value

不言
不言Original
2018-04-18 14:05:222919browse

This article mainly introduces the maximum value of php file upload configuration, which has certain reference value. Now I share it with everyone. Friends in need can refer to it

Maximum value of php file upload configuration

Open php.ini, first find

;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

The following parameters that affect file upload:

file_uploads   =   on   ;是否允许通过HTTP上传文件的开关。默认为ON即是开

upload_tmp_dir   ;文件上传至服务器上存储临时文件的地方,如果没指定就会用系统默认的临时文件夹

upload_max_filesize   =   8m   ;望文生意,即允许上传文件大小的最大值。默认为2M

Find

;;;;;;;;;;;;;;;;;
; Data Handling ;
;;;;;;;;;;;;;;;;;

and one more:

post_max_size   =   8m ;指通过表单POST给PHP的所能接收的最大值,包括表单里的所有值。默认为8M
Generally, after setting the above four parameters, uploading files of
But if you want to upload a large file >8M, it will definitely work if you only set the above four items.
Unless your network really has a 100M/S upload speed, you still have to care about the following parameters:
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time   =   600 ;每个PHP页面运行的最大时间值(秒),默认30秒

max_input_time = 600 ;每个PHP页面接收数据所需的最大时间,默认60秒

memory_limit   =   8m   ;每个PHP页面所吃掉的最大内存,默认8M

Related recommendations:

php file operations -Add data from other files to this file

The above is the detailed content of php file upload configuration maximum value. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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