Updates to Tomato RAF including NGINX && PHP
[tomato.git] / release / src / router / php / sapi / tests / test006.phpt
blob45e37811ef71e43f2c2784211842cd4adf5d8a57
1 --TEST--
2 Multipart Form POST Data
3 --HEADERS--
4 return <<<END
5 Content-Type=multipart/form-data; boundary=---------------------------240723202011929
6 Content-Length=862
7 END;
8 --ENV--
9 return <<<END
10 CONTENT_TYPE=multipart/form-data; boundary=---------------------------240723202011929
11 CONTENT_LENGTH=862
12 END;
13 --POST--
14 -----------------------------240723202011929
15 Content-Disposition: form-data; name="entry"
17 entry box
18 -----------------------------240723202011929
19 Content-Disposition: form-data; name="password"
21 password box
22 -----------------------------240723202011929
23 Content-Disposition: form-data; name="radio1"
25 test 1
26 -----------------------------240723202011929
27 Content-Disposition: form-data; name="checkbox1"
29 test 1
30 -----------------------------240723202011929
31 Content-Disposition: form-data; name="choices"
33 Choice 1
34 -----------------------------240723202011929
35 Content-Disposition: form-data; name="choices"
37 Choice 2
38 -----------------------------240723202011929
39 Content-Disposition: form-data; name="file"; filename="info.php"
40 Content-Type: application/octet-stream
42 <?php
43 phpinfo();
45 -----------------------------240723202011929--
47 --FILE--
48 <?php 
49 error_reporting(0);
50 print_r($_POST);
51 print_r($_FILES);
53 --EXPECTF--
54 Array
56     [entry] => entry box
57     [password] => password box
58     [radio1] => test 1
59     [checkbox1] => test 1
60     [choices] => Choice 2
62 Array
64     [file] => Array
65         (
66             [name] => info.php
67             [type] => application/octet-stream
68             [tmp_name] => %s
69             [error] => 0
70             [size] => 21
71         )