Annotation of embedaddon/php/tests/basic/rfc1867_array_upload.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: rfc1867 array upload
3: --INI--
4: file_uploads=1
5: error_reporting=E_ALL&~E_NOTICE
6: comment=debug builds show some additional E_NOTICE errors
7: upload_max_filesize=1024
8: --POST_RAW--
9: Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737
10: -----------------------------20896060251896012921717172737
11: Content-Disposition: form-data; name="file[]"; filename="file1.txt"
12: Content-Type: text/plain-file1
13:
14: 1
15: -----------------------------20896060251896012921717172737
16: Content-Disposition: form-data; name="file[2]"; filename="file2.txt"
17: Content-Type: text/plain-file2
18:
19: 2
20: -----------------------------20896060251896012921717172737
21: Content-Disposition: form-data; name="file[]"; filename="file3.txt"
22: Content-Type: text/plain-file3
23:
24: 3
25: -----------------------------20896060251896012921717172737--
26: --FILE--
27: <?php
28: var_dump($_FILES);
29: var_dump($_POST);
30: ?>
31: --EXPECTF--
32: array(1) {
33: [%u|b%"file"]=>
34: array(5) {
35: [%u|b%"name"]=>
36: array(3) {
37: [0]=>
38: %unicode|string%(9) "file1.txt"
39: [2]=>
40: %unicode|string%(9) "file2.txt"
41: [3]=>
42: %unicode|string%(9) "file3.txt"
43: }
44: [%u|b%"type"]=>
45: array(3) {
46: [0]=>
47: %unicode|string%(16) "text/plain-file1"
48: [2]=>
49: %unicode|string%(16) "text/plain-file2"
50: [3]=>
51: %unicode|string%(16) "text/plain-file3"
52: }
53: [%u|b%"tmp_name"]=>
54: array(3) {
55: [0]=>
56: %unicode|string%(%d) "%s"
57: [2]=>
58: %unicode|string%(%d) "%s"
59: [3]=>
60: %unicode|string%(%d) "%s"
61: }
62: [%u|b%"error"]=>
63: array(3) {
64: [0]=>
65: int(0)
66: [2]=>
67: int(0)
68: [3]=>
69: int(0)
70: }
71: [%u|b%"size"]=>
72: array(3) {
73: [0]=>
74: int(1)
75: [2]=>
76: int(1)
77: [3]=>
78: int(1)
79: }
80: }
81: }
82: array(0) {
83: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>