1--TEST-- 2rfc1867 max_file_uploads - empty files shouldn't count (non-debug version) 3--SKIPIF-- 4<?php if(function_exists("leak")) print "skip only for non-debug builds"; ?> 5--INI-- 6file_uploads=1 7error_reporting=E_ALL 8max_file_uploads=2 9--POST_RAW-- 10Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 11-----------------------------20896060251896012921717172737 12Content-Disposition: form-data; name="file2"; filename="" 13Content-Type: text/plain-file 14 15 16-----------------------------20896060251896012921717172737 17Content-Disposition: form-data; name="file3"; filename="" 18Content-Type: text/plain-file 19 2033 21-----------------------------20896060251896012921717172737 22Content-Disposition: form-data; name="file4"; filename="file4.txt" 23Content-Type: text/plain-file 24 25 26-----------------------------20896060251896012921717172737 27Content-Disposition: form-data; name="file1"; filename="file1.txt" 28Content-Type: text/plain-file 29 301 31-----------------------------20896060251896012921717172737-- 32--FILE-- 33<?php 34var_dump($_FILES); 35var_dump($_POST); 36if (is_uploaded_file($_FILES["file1"]["tmp_name"])) { 37 var_dump(file_get_contents($_FILES["file1"]["tmp_name"])); 38} 39if (is_uploaded_file($_FILES["file4"]["tmp_name"])) { 40 var_dump(file_get_contents($_FILES["file4"]["tmp_name"])); 41} 42?> 43--EXPECTF-- 44array(4) { 45 ["file2"]=> 46 array(5) { 47 ["name"]=> 48 string(0) "" 49 ["type"]=> 50 string(0) "" 51 ["tmp_name"]=> 52 string(0) "" 53 ["error"]=> 54 int(4) 55 ["size"]=> 56 int(0) 57 } 58 ["file3"]=> 59 array(5) { 60 ["name"]=> 61 string(0) "" 62 ["type"]=> 63 string(0) "" 64 ["tmp_name"]=> 65 string(0) "" 66 ["error"]=> 67 int(4) 68 ["size"]=> 69 int(0) 70 } 71 ["file4"]=> 72 array(5) { 73 ["name"]=> 74 string(9) "file4.txt" 75 ["type"]=> 76 string(15) "text/plain-file" 77 ["tmp_name"]=> 78 string(%d) "%s" 79 ["error"]=> 80 int(0) 81 ["size"]=> 82 int(0) 83 } 84 ["file1"]=> 85 array(5) { 86 ["name"]=> 87 string(9) "file1.txt" 88 ["type"]=> 89 string(15) "text/plain-file" 90 ["tmp_name"]=> 91 string(%d) "%s" 92 ["error"]=> 93 int(0) 94 ["size"]=> 95 int(1) 96 } 97} 98array(0) { 99} 100string(1) "1" 101string(0) "" 102