rfc1867_anonymous_upload.phpt 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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(6) {
  27. ["name"]=>
  28. string(9) "file1.txt"
  29. ["full_path"]=>
  30. string(9) "file1.txt"
  31. ["type"]=>
  32. string(16) "text/plain-file1"
  33. ["tmp_name"]=>
  34. string(%d) "%s"
  35. ["error"]=>
  36. int(0)
  37. ["size"]=>
  38. int(1)
  39. }
  40. [%d]=>
  41. array(6) {
  42. ["name"]=>
  43. string(9) "file2.txt"
  44. ["full_path"]=>
  45. string(9) "file2.txt"
  46. ["type"]=>
  47. string(16) "text/plain-file2"
  48. ["tmp_name"]=>
  49. string(%d) "%s"
  50. ["error"]=>
  51. int(0)
  52. ["size"]=>
  53. int(1)
  54. }
  55. }
  56. array(0) {
  57. }