rfc1867_anonymous_upload.phpt 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. --TEST--
  2. rfc1867 anonymous upload
  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
  8. max_file_uploads=10
  9. --POST_RAW--
  10. Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737
  11. -----------------------------20896060251896012921717172737
  12. Content-Disposition: form-data; filename="file1.txt"
  13. Content-Type: text/plain-file1
  14. 1
  15. -----------------------------20896060251896012921717172737
  16. Content-Disposition: form-data; filename="file2.txt"
  17. Content-Type: text/plain-file2
  18. 2
  19. -----------------------------20896060251896012921717172737--
  20. --FILE--
  21. <?php
  22. var_dump($_FILES);
  23. var_dump($_POST);
  24. ?>
  25. --EXPECTF--
  26. array(2) {
  27. [%d]=>
  28. array(5) {
  29. [%u|b%"name"]=>
  30. %string|unicode%(9) "file1.txt"
  31. [%u|b%"type"]=>
  32. %string|unicode%(16) "text/plain-file1"
  33. [%u|b%"tmp_name"]=>
  34. %string|unicode%(%d) "%s"
  35. [%u|b%"error"]=>
  36. int(0)
  37. [%u|b%"size"]=>
  38. int(1)
  39. }
  40. [%d]=>
  41. array(5) {
  42. [%u|b%"name"]=>
  43. %string|unicode%(9) "file2.txt"
  44. [%u|b%"type"]=>
  45. %string|unicode%(16) "text/plain-file2"
  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. }
  54. array(0) {
  55. }