Php Upload large file settings ,. Php Upload large file setting method, open php. ini, first find; fileuploads ;;;;;;;;;;;;;;;;; region, which has the following parameters that affect file upload: file_upload php sets the method for uploading large files,
Open php. ini, first find
;;;;;;;;;;;;;;;;
; File uploads;
;;;;;;;;;;;;;;;;
Region, which has the following parameters that affect file upload:
File_uploads = on; // whether to allow file upload over http. The default value is on, which is to open upload_tmp_dir; // The file is uploaded to the place where the temporary file is stored on the server. if it is not specified, the system uses the default temporary folder upload_max_filesize = 8 m; // Wangwen business, that is, the maximum file size that can be uploaded. The default value is 2 MB.
In
;;;;;;;;;;;;;;;;;
; Data handling;
;;;;;;;;;;;;;;;;;
Region:
Post_max_size = 8 m; // The maximum value that can be received by posting a form to php, including all values in the form. The default value is 8 MB.
Generally, after the preceding four parameters are set, uploading the file <= 8 m is not a problem, but the network is normal.
However, if you want to upload a large file larger than 8 MB, you can only set the above four items. Unless your network has a high upload speed of 100 Mbit/s, you have to pay attention to the following parameters:
;;;;;;;;;;;;;;;;;;;
; Resource limits;
;;;;;;;;;;;;;;;;;;;
Max_execution_time = 600; // maximum time (in seconds) for running each php page. max_input_time = 600 by default; // the maximum time required for receiving data on each php page, the default value is 60 seconds for memory_limit = 8 m. // The maximum memory consumed by each php page. the default value is 8 m.
Articles you may be interested in:
- Upload a large file using apache + php and upload the file 100M as an example.
- PHP fastcgi mode uploads large files (more than 300 K) and reports an error
- Reasons for failure of uploading large files in php and countermeasures
Enabled, open php. ini, first find; file uploads ;;;;;;;;;;;;;;;;; the following parameters affect file upload: file_upload...