Re: retrieve POST body?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



That's not been my experience. I've tested it with enctype="multipart/form-data", since that's what you asked for, though the enctype wasn't included in my sample code. I've run it on PHP Version => 5.1.6 (Fedora core 4) and PHP 4.3.11 Fedora core 2.
Here it is on Fedora 2:
       http://www.mturner.org/temp/post_data.php
The code is
   http://www.mturner.org/temp/post_data.phps
That latter is just a symbolic link to the former.

It's possible that there's been a change in 5.2 that changes this behavior, or possibly the way the FreeBSD and Windows handle STDOUT. My little earlier snippet of Perl should work on any system, and so if you know any Perl, an elaboration of that would be the way to go.
Justin Frim wrote:
Sorry burst your bubble, but your solution isn't a viable one in my case.
php://input only works if the form is submitted using application/x-www-form-urlencoded.

Take your sample HTML code there and add enctype="multipart/form-data" to the <form> tag, and I'm pretty sure you'll find that php://input contains no data. (Both PHP 5.2.1 running as a CGI on Windows and PHP 5.2.0 running as an Apache module on FreeBSD exhibit this behaviour.)

And before anyone asks, it *is* a requirement to accept multipart/form-data submissions because that's the only way you can properly implement a file upload on a web form.



--

_____________________
Myron Turner
http://www.room535.org
http://www.bstatzero.org
http://www.mturner.org/XML_PullParser/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux