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