File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
tests /
basic /
rfc1867_post_max_filesize.phpt
Revision
1.1.1.2 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue May 29 12:34:34 2012 UTC (12 years, 2 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
HEAD
php 5.4.3+patches
1: --TEST--
2: rfc1867 post_max_filesize
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=1
8: max_file_uploads=10
9: --POST_RAW--
10: Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737
11: -----------------------------20896060251896012921717172737
12: Content-Disposition: form-data; name="file1"; filename="file1.txt"
13: Content-Type: text/plain-file1
14:
15: 1
16: -----------------------------20896060251896012921717172737
17: Content-Disposition: form-data; name="file2"; filename="file2.txt"
18: Content-Type: text/plain-file2
19:
20: 22
21: -----------------------------20896060251896012921717172737
22: Content-Disposition: form-data; name="file3"; filename="file3.txt"
23: Content-Type: text/plain-file3
24:
25: 3
26: -----------------------------20896060251896012921717172737--
27: --FILE--
28: <?php
29: var_dump($_FILES);
30: var_dump($_POST);
31: if (is_uploaded_file($_FILES["file1"]["tmp_name"])) {
32: var_dump(file_get_contents($_FILES["file1"]["tmp_name"]));
33: }
34: if (is_uploaded_file($_FILES["file3"]["tmp_name"])) {
35: var_dump(file_get_contents($_FILES["file3"]["tmp_name"]));
36: }
37: ?>
38: --EXPECTF--
39: array(3) {
40: [%u|b%"file1"]=>
41: array(5) {
42: [%u|b%"name"]=>
43: %string|unicode%(9) "file1.txt"
44: [%u|b%"type"]=>
45: %string|unicode%(16) "text/plain-file1"
46: [%u|b%"tmp_name"]=>
47: %string|unicode%(%d) "%s"
48: [%u|b%"error"]=>
49: int(0)
50: [%u|b%"size"]=>
51: int(1)
52: }
53: [%u|b%"file2"]=>
54: array(5) {
55: [%u|b%"name"]=>
56: %string|unicode%(9) "file2.txt"
57: [%u|b%"type"]=>
58: %string|unicode%(0) ""
59: [%u|b%"tmp_name"]=>
60: %string|unicode%(0) ""
61: [%u|b%"error"]=>
62: int(1)
63: [%u|b%"size"]=>
64: int(0)
65: }
66: [%u|b%"file3"]=>
67: array(5) {
68: [%u|b%"name"]=>
69: %string|unicode%(9) "file3.txt"
70: [%u|b%"type"]=>
71: %string|unicode%(16) "text/plain-file3"
72: [%u|b%"tmp_name"]=>
73: %string|unicode%(%d) "%s"
74: [%u|b%"error"]=>
75: int(0)
76: [%u|b%"size"]=>
77: int(1)
78: }
79: }
80: array(0) {
81: }
82: string(1) "1"
83: string(1) "3"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>