Re: $_GET, $_POST, $_COOKIE, $_FILES == $_REQUEST?
| From: | Yasuo Ohgaki | Date: | Tue, 15 Oct 2002 21:13:08 +0000 |
| Subject: | Re: $_GET, $_POST, $_COOKIE, $_FILES == $_REQUEST? | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-89517@lists.php.net to get a copy of this message | ||
Another option.
How about remove $_FILES contents from $_REQUEST?
It seems it has less impact.
--
Yasuo Ohgaki
Sterling Hughes wrote:
> Hey,
>
> If you haven't taken a look @:
> http://bugs.php.net/bug.php?id=19848
>
> please do so...
>
> In thinking about it, to me, there are 2 solutions:
>
> 1) Rearranging files to work in an un-braindead manner, ie:
>
> instead of $_FILES['toto']['type']['c'] equaling the filetype of
> the
> form variable:
>
> <INPUT TYPE="file" NAME="toto[c]">
>
> We have ::
>
> $_FILES['toto']['c']['type']
>
> Of course this breaks BC, which is not good, but then again, neither is
> the alternative.
>
> 2) The alternative is to add some custom code (I'll write it up) that
> will re-arrange the $_FILES array when it is inserted into the $_REQUEST
> array (leaving the $_FILES array alone, but modifying its order when its
> merged into $_REQUEST).
>
> so you have:
>
> $_REQUEST['toto']['c']['type']
>
> and
>
> $_FILES['toto']['type']['c']
>
> which is ugly and just not right, but it maintains backwards
> compatibility with the $_FILES array.
>
> My personal opinion is that the second solution should be merged in for
> PHP 4.3, and that for PHPv5 we should normalize the $_FILE array.
>
> Thoughts? Comments? Questions?
>
> I'll start working on this tommorow unless i hear otherwise..
>
> -Sterling