From dd144da0e1bb146063e1e0e4a37051ef54a1e59c Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Wed, 15 Sep 2010 04:08:06 +0000 Subject: [PATCH] Fix doc bug #52846 (max_file_uploads is not mentioned in the documentation). git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@303378 c90b9560-bf6c-de11-be94-00142212c4b1 --- features/file-upload.xml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/features/file-upload.xml b/features/file-upload.xml index eeb19f074d..e1b234b2e8 100644 --- a/features/file-upload.xml +++ b/features/file-upload.xml @@ -385,6 +385,17 @@ foreach ($_FILES["pictures"]["error"] as $key => $error) { small, large files cannot be uploaded. Make sure you set post_max_size large enough. + + Since PHP 5.2.12, the + max_file_uploads configuration + setting controls the maximum number of files that can uploaded in one + request. If more files are uploaded than the limit, then + $_FILES will stop processing files once the limit is + reached. For example, if + max_file_uploads is set to + 10, then $_FILES will never contain + more than 10 items. + Not validating which file you operate on may mean that users can access sensitive information in other directories. @@ -462,6 +473,15 @@ foreach ($_FILES["pictures"]["error"] as $key => $error) { $_FILES['userfile']['type'][0] are also set. + + + Since PHP 5.2.12, the + max_file_uploads + configuration setting acts as a limit on the number of files that can be + uploaded in one request. You will need to ensure that your form does not + try to upload more files in one request than this limit. + +