NYCPHP Meetup

NYPHP.org

[nycphp-talk] HTTP request body

csnyder chsnyder at gmail.com
Wed Sep 1 09:50:47 EDT 2004


On Wed, 01 Sep 2004 09:04:50 -0400, Jerry Kapron <nyphp at newageweb.com> wrote:
> However, it gets more complicated when the request contains file upload data
> (especially with multiple files).

This isn't really an answer to your question, but there are easier
ways of handling multiple file uploads than trying to parse the entire
request body. The following form would post 3 files, available to the
PHP as an array called $_FILES['myfiles']

<input type="file" name="myfiles[]" />
<input type="file" name="myfiles[]" />
<input type="file" name="myfiles[]" />

If you really need the full request body, you can use
$HTTP_RAW_POST_DATA if you enable it in php.ini or using a setini()
call. Or check out the php://input stream documentation.



More information about the talk mailing list