You are here: Re: parse_str() - issue « PHP Programming Language « IT news, forums, messages
Re: parse_str() - issue

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация