File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / tests / basic / rfc1867_post_max_filesize.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:48:06 2012 UTC (12 years, 5 months ago) by misho
Branches: php, MAIN
CVS tags: v5_3_10, HEAD
php

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

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