|
Posted by Rik on 07/14/06 00:42
niels.froehling@seies.de wrote:
> Hy;
>
> Hmm, I was experimenting with parse_str() and faked POSTs and came up
> with a rather strange behaviour:
>
> parse_str("_POST[test]=test");
>
> puts 'test' in both _POST *and* _FILES
Yes.
> and probably in all the others
> (_REQUEST, _GET) too.
No, it won't.
> Does somebody know why this occurs? Is it a bug?
> (PHP Version 4.3.8)
Actually, $_FILES are a subset of $_POST, it's data send to the server by a
POST method.
$_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 :-)
Grtz,
--
Rik Wasmus
Navigation:
[Reply to this message]
|