xref: /PHP-7.3/tests/basic/029.phpt (revision 755c2cd0)
1--TEST--
2Shift_JIS request
3--SKIPIF--
4<?php
5if (!extension_loaded("mbstring")) {
6  die("skip Requires mbstring extension");
7}
8?>
9--INI--
10file_uploads=1
11mbstring.encoding_translation=1
12mbstring.http_input=Shift_JIS
13mbstring.internal_encoding=UTF-8
14--POST_RAW--
15Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737
16-----------------------------20896060251896012921717172737
17Content-Disposition: form-data; name="�\�\�\"
18
19�h���~�t�@�\
20-----------------------------20896060251896012921717172737
21Content-Disposition: form-data; name="pics"; filename="file1.txt"
22Content-Type: text/plain
23
24file1
25
26-----------------------------20896060251896012921717172737--
27--FILE--
28<?php
29var_dump($_FILES);
30var_dump($_POST);
31?>
32--EXPECTF--
33array(1) {
34  ["pics"]=>
35  array(5) {
36    ["name"]=>
37    string(9) "file1.txt"
38    ["type"]=>
39    string(10) "text/plain"
40    ["tmp_name"]=>
41    string(%d) "%s"
42    ["error"]=>
43    int(0)
44    ["size"]=>
45    int(6)
46  }
47}
48array(1) {
49  ["予蚕能"]=>
50  string(18) "ドレミファソ"
51}
52