PHP default upload limit is the maximum 2M, want to upload more than this set of files, need to adjust PHP, Apache and some other parameters. Below, we briefly introduce the PHP file upload some of the parameters involved:
File_uploads: Allow the switch to upload files via HTTP, which is on by default.
Upload_tmp_dir:upload_tmp_dir used to describe the temporary directory of files placed in PHP upload, to upload files, you have to ensure that the server does not turn off temporary files and have write permissions on the folder, if not specified then PHP use the system default values.
Upload_max_filesize: The maximum size allowed for uploading files, the default is 2M.
Post_max_size: Controls the maximum amount of data that PHP can receive when using the Post method for a form submission. If you want to use the php file upload feature, you need to change this value to be larger than upload_max_filesize.
Max_input_time: Limits the time to receive data by post, get, and put in seconds. If your application is running on a low speed link, you need to increase this value to accommodate the additional time required to receive data.
Memory_limit: To avoid running scripts that use the system's available memory heavily, PHP allows you to define memory usage limits. The value of the maximum memory capacity variable Memory_limit that a single script program can use is specified by the Memory_limit variable to be appropriately larger than the Post_max_size value.
Max_execution_time:max_execution_time sets the time, in seconds, before PHP waits for the script to finish executing before the script is forced to terminate. This variable is useful when the script enters an infinite loop state. However, when there is a legitimate activity that takes a long time to complete (such as uploading a large file), this feature can also cause the operation to fail. In such cases you must consider increasing the value of this variable to avoid PHP shutting down the script while the script is performing some important process.
For Linux hosts, there may be php.conf files underneath the/etc/httpd/conf.d/access.conf/, which may solve some of the system's file size limitations.
The above mentioned is the entire content of this article, I hope to be able to master the php file upload some help.