Annotation of embedaddon/php/tests/basic/rfc1867_max_file_size.phpt, revision 1.1.1.2

1.1       misho       1: --TEST--
                      2: rfc1867 MAX_FILE_SIZE
                      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
1.1.1.2 ! misho       8: max_file_uploads=10
1.1       misho       9: --POST_RAW--
                     10: Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737
                     11: -----------------------------20896060251896012921717172737
                     12: Content-Disposition: form-data; name="MAX_FILE_SIZE"
                     13: 
                     14: 1
                     15: -----------------------------20896060251896012921717172737
                     16: Content-Disposition: form-data; name="file1"; filename="file1.txt"
                     17: Content-Type: text/plain-file1
                     18: 
                     19: 1
                     20: -----------------------------20896060251896012921717172737
                     21: Content-Disposition: form-data; name="file2"; filename="file2.txt"
                     22: Content-Type: text/plain-file2
                     23: 
                     24: 22
                     25: -----------------------------20896060251896012921717172737
                     26: Content-Disposition: form-data; name="file3"; filename="C:\foo\bar/file3.txt"
                     27: Content-Type: text/plain-file3;
                     28: 
                     29: 3
                     30: -----------------------------20896060251896012921717172737--
                     31: --FILE--
                     32: <?php
                     33: var_dump($_FILES);
                     34: var_dump($_POST);
                     35: if (is_uploaded_file($_FILES["file1"]["tmp_name"])) {
                     36:        var_dump(file_get_contents($_FILES["file1"]["tmp_name"]));
                     37: }
                     38: if (is_uploaded_file($_FILES["file3"]["tmp_name"])) {
                     39:        var_dump(file_get_contents($_FILES["file3"]["tmp_name"]));
                     40: }
                     41: ?>
                     42: --EXPECTF--
                     43: array(3) {
                     44:   [%u|b%"file1"]=>
                     45:   array(5) {
                     46:     [%u|b%"name"]=>
                     47:     %string|unicode%(9) "file1.txt"
                     48:     [%u|b%"type"]=>
                     49:     %string|unicode%(16) "text/plain-file1"
                     50:     [%u|b%"tmp_name"]=>
                     51:     %string|unicode%(%d) "%s"
                     52:     [%u|b%"error"]=>
                     53:     int(0)
                     54:     [%u|b%"size"]=>
                     55:     int(1)
                     56:   }
                     57:   [%u|b%"file2"]=>
                     58:   array(5) {
                     59:     [%u|b%"name"]=>
                     60:     %string|unicode%(9) "file2.txt"
                     61:     [%u|b%"type"]=>
                     62:     %string|unicode%(0) ""
                     63:     [%u|b%"tmp_name"]=>
                     64:     %string|unicode%(0) ""
                     65:     [%u|b%"error"]=>
                     66:     int(2)
                     67:     [%u|b%"size"]=>
                     68:     int(0)
                     69:   }
                     70:   [%u|b%"file3"]=>
                     71:   array(5) {
                     72:     [%u|b%"name"]=>
                     73:     %string|unicode%(9) "file3.txt"
                     74:     [%u|b%"type"]=>
                     75:     %string|unicode%(16) "text/plain-file3"
                     76:     [%u|b%"tmp_name"]=>
                     77:     %string|unicode%(%d) "%s"
                     78:     [%u|b%"error"]=>
                     79:     int(0)
                     80:     [%u|b%"size"]=>
                     81:     int(1)
                     82:   }
                     83: }
                     84: array(1) {
                     85:   [%u|b%"MAX_FILE_SIZE"]=>
                     86:   %string|unicode%(1) "1"
                     87: }
                     88: string(1) "1"
                     89: string(1) "3"

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>