PHP modified File Upload Limit method Summary,
PHP default upload limit is maximum 2M, want to upload more than this set of files, need to adjust PHP, Apache and other parameters. Below, we briefly describe some of the parameters involved in uploading PHP files:
File_uploads: Whether to allow the switch to upload files over HTTP, the default is on is on.
Upload_tmp_dir:upload_tmp_dir used to explain the PHP upload files placed in a temporary directory, to upload files, you have to ensure that the server does not close the temporary files and have write permissions to the folder, if not specified, PHP uses the system default values.
Upload_max_filesize: The maximum number of file sizes allowed to upload, default is 2M.
Post_max_size: Controls the maximum amount of data PHP can receive in a single form submission using the Post method. If you want to use PHP file upload functionality, you need to change this value to be larger than upload_max_filesize.
Max_input_time: The time to receive data by post, get, and put is limited in seconds. If your application is running on a low-speed link, you need to increase this value to accommodate the additional time it takes to receive the data.
Memory_limit: PHP allows you to define memory usage limits in order to avoid running scripts that use the system's available memory heavily. The Memory_limit variable is used to specify the maximum memory capacity variable that a single script can use memory_limit the value should be appropriately greater than the value of post_max_size.
Max_execution_time:max_execution_time sets the time at which PHP waits for the script to complete before forcing the script to terminate, which is calculated in seconds. This variable is useful when the script enters an infinite loop state. However, this feature also causes the operation to fail when there is a legitimate activity that takes a long time to complete, such as uploading large files. In such cases, you must consider increasing the value of this variable to avoid PHP closing the script when the script is performing some important process.
For Linux hosts, there may also be php.conf files under/etc/httpd/conf.d/access.conf/, which may solve some system file size limitation issues.
The above is the whole content of this article, I hope we can be familiar with the php file upload helpful.
http://www.bkjia.com/PHPjc/980227.html www.bkjia.com true http://www.bkjia.com/PHPjc/980227.html techarticle php Modified File Upload limit method summary, php default upload limit is maximum 2M, want to upload more than this set of files, need to adjust PHP, Apache and other parameters. Below, we briefly ...