rfc1867_anonymous_upload.phpt 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. --TEST--
  2. rfc1867 anonymous upload
  3. --INI--
  4. file_uploads=1
  5. upload_max_filesize=1024
  6. max_file_uploads=10
  7. --POST_RAW--
  8. Content-Type: multipart/form-data; boundary=---------------------------20896060251896012921717172737
  9. -----------------------------20896060251896012921717172737
  10. Content-Disposition: form-data; filename="file1.txt"
  11. Content-Type: text/plain-file1
  12. 1
  13. -----------------------------20896060251896012921717172737
  14. Content-Disposition: form-data; filename="file2.txt"
  15. Content-Type: text/plain-file2
  16. 2
  17. -----------------------------20896060251896012921717172737--
  18. --FILE--
  19. <?php
  20. var_dump($_FILES);
  21. var_dump($_POST);
  22. ?>
  23. --EXPECTF--
  24. array(2) {
  25. [%d]=>
  26. array(5) {
  27. ["name"]=>
  28. string(9) "file1.txt"
  29. ["type"]=>
  30. string(16) "text/plain-file1"
  31. ["tmp_name"]=>
  32. string(%d) "%s"
  33. ["error"]=>
  34. int(0)
  35. ["size"]=>
  36. int(1)
  37. }
  38. [%d]=>
  39. array(5) {
  40. ["name"]=>
  41. string(9) "file2.txt"
  42. ["type"]=>
  43. string(16) "text/plain-file2"
  44. ["tmp_name"]=>
  45. string(%d) "%s"
  46. ["error"]=>
  47. int(0)
  48. ["size"]=>
  49. int(1)
  50. }
  51. }
  52. array(0) {
  53. }