File tree Expand file tree Collapse file tree 1 file changed +74
-0
lines changed Expand file tree Collapse file tree 1 file changed +74
-0
lines changed Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Request #77372 (Relative file path is removed from uploaded file)
3
+ --INI--
4
+ file_uploads=1
5
+ upload_max_filesize=1024
6
+ max_file_uploads=10
7
+ --POST_RAW--
8
+ Content-Type: multipart/form-data; boundary=---------------------------64369134225794159231042985467
9
+ -----------------------------64369134225794159231042985467
10
+ Content-Disposition: form-data; name="files[]"; filename="directory/subdirectory/file2.txt"
11
+ Content-Type: text/plain
12
+
13
+ 2
14
+ -----------------------------64369134225794159231042985467
15
+ Content-Disposition: form-data; name="files[]"; filename="directory/file1.txt"
16
+ Content-Type: text/plain
17
+
18
+ 1
19
+ -----------------------------64369134225794159231042985467--
20
+ --FILE--
21
+ <?php
22
+ var_dump ($ _FILES );
23
+ var_dump ($ _POST );
24
+ ?>
25
+ --EXPECTF--
26
+ array(1) {
27
+ ["files"]=>
28
+ array(6) {
29
+ ["name"]=>
30
+ array(2) {
31
+ [0]=>
32
+ string(9) "file2.txt"
33
+ [1]=>
34
+ string(9) "file1.txt"
35
+ }
36
+ ["full_path"]=>
37
+ array(2) {
38
+ [0]=>
39
+ string(32) "directory/subdirectory/file2.txt"
40
+ [1]=>
41
+ string(19) "directory/file1.txt"
42
+ }
43
+ ["type"]=>
44
+ array(2) {
45
+ [0]=>
46
+ string(10) "text/plain"
47
+ [1]=>
48
+ string(10) "text/plain"
49
+ }
50
+ ["tmp_name"]=>
51
+ array(2) {
52
+ [0]=>
53
+ string(%d) "%s"
54
+ [1]=>
55
+ string(%d) "%s"
56
+ }
57
+ ["error"]=>
58
+ array(2) {
59
+ [0]=>
60
+ int(0)
61
+ [1]=>
62
+ int(0)
63
+ }
64
+ ["size"]=>
65
+ array(2) {
66
+ [0]=>
67
+ int(1)
68
+ [1]=>
69
+ int(1)
70
+ }
71
+ }
72
+ }
73
+ array(0) {
74
+ }
You can’t perform that action at this time.
0 commit comments