1--TEST-- 2rfc1867 MAX_FILE_SIZE 3--INI-- 4file_uploads=1 5error_reporting=E_ALL&~E_NOTICE 6comment=debug builds show some additional E_NOTICE errors 7upload_max_filesize=1024 8max_file_uploads=10 9--POST_RAW-- 10Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737 11-----------------------------20896060251896012921717172737 12Content-Disposition: form-data; name="MAX_FILE_SIZE" 13 141 15-----------------------------20896060251896012921717172737 16Content-Disposition: form-data; name="file1"; filename="file1.txt" 17Content-Type: text/plain-file1 18 191 20-----------------------------20896060251896012921717172737 21Content-Disposition: form-data; name="file2"; filename="file2.txt" 22Content-Type: text/plain-file2 23 2422 25-----------------------------20896060251896012921717172737 26Content-Disposition: form-data; name="file3"; filename="C:\foo\bar/file3.txt" 27Content-Type: text/plain-file3; 28 293 30-----------------------------20896060251896012921717172737-- 31--FILE-- 32<?php 33var_dump($_FILES); 34var_dump($_POST); 35if (is_uploaded_file($_FILES["file1"]["tmp_name"])) { 36 var_dump(file_get_contents($_FILES["file1"]["tmp_name"])); 37} 38if (is_uploaded_file($_FILES["file3"]["tmp_name"])) { 39 var_dump(file_get_contents($_FILES["file3"]["tmp_name"])); 40} 41?> 42--EXPECTF-- 43array(3) { 44 [%u|b%"file1"]=> 45 array(5) { 46 [%u|b%"name"]=> 47 %string|unicode%(9) "file1.txt" 48 [%u|b%"type"]=> 49 %string|unicode%(16) "text/plain-file1" 50 [%u|b%"tmp_name"]=> 51 %string|unicode%(%d) "%s" 52 [%u|b%"error"]=> 53 int(0) 54 [%u|b%"size"]=> 55 int(1) 56 } 57 [%u|b%"file2"]=> 58 array(5) { 59 [%u|b%"name"]=> 60 %string|unicode%(9) "file2.txt" 61 [%u|b%"type"]=> 62 %string|unicode%(0) "" 63 [%u|b%"tmp_name"]=> 64 %string|unicode%(0) "" 65 [%u|b%"error"]=> 66 int(2) 67 [%u|b%"size"]=> 68 int(0) 69 } 70 [%u|b%"file3"]=> 71 array(5) { 72 [%u|b%"name"]=> 73 %string|unicode%(9) "file3.txt" 74 [%u|b%"type"]=> 75 %string|unicode%(16) "text/plain-file3" 76 [%u|b%"tmp_name"]=> 77 %string|unicode%(%d) "%s" 78 [%u|b%"error"]=> 79 int(0) 80 [%u|b%"size"]=> 81 int(1) 82 } 83} 84array(1) { 85 [%u|b%"MAX_FILE_SIZE"]=> 86 %string|unicode%(1) "1" 87} 88string(1) "1" 89string(1) "3" 90