Do you have a question? Post it now! No Registration Necessary. Now with pictures!
July 13, 2006, 11:32 pm
rate this thread
Hmm, I was experimenting with parse_str() and faked POSTs and came up
with a rather strange behaviour:
puts 'test' in both _POST *and* _FILES and probably in all the others
(_REQUEST, _GET) too. Does somebody know why this occurs? Is it a bug?
(PHP Version 4.3.8)
Re: parse_str() - issue
No, it won't.
Actually, $_FILES are a subset of $_POST, it's data send to the server by a
$_FILES is, according to the manual, "An associative array of items uploaded
to the current script via the HTTP POST method."
I doubt this is really intended behaviour, but that's the logic behind it. I
assume the normal logic to build the $_FILES & split them from the $_POST
array is not executed in parse_str().
I don't know heck about C, but to me it seems the logic of building $_FILES
is in /main/rfc1867.c of the source. There should be a guru out here who can
explain it better :-)