Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28012 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69137 invoked by uid 1010); 12 Feb 2007 02:31:14 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 69121 invoked from network); 12 Feb 2007 02:31:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Feb 2007 02:31:14 -0000 X-Host-Fingerprint: 75.31.106.84 adsl-75-31-106-84.dsl.irvnca.sbcglobal.net Received: from [75.31.106.84] ([75.31.106.84:19110] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F9/00-03106-171DFC54 for ; Sun, 11 Feb 2007 21:31:13 -0500 Message-ID: To: internals@lists.php.net Date: Sun, 11 Feb 2007 18:31:33 -0800 User-Agent: Thunderbird 1.5.0.10pre (Windows/20070210) MIME-Version: 1.0 References: <1170975758.5280.16.camel@bbox> In-Reply-To: <1170975758.5280.16.camel@bbox> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 75.31.106.84 Subject: Re: _FILES From: unknown@simplemachines.org ("Unknown W. Brackets") I've always assumed it was for security. Imagine something like: Realistically, if you tried to access the value as a string, you would get "Array" either way. But I still wouldn't want users to be able to "pollute" $_FILES for people who were assuming a non-array upload. The way it is now, $_FILES['upload']['tmp_name'] is always actually what you think it is, it just might be a string or an array structure. But at least it definitely didn't come from the user. -[Unknown] -------- Original Message -------- > I was wondering if anyone could point me to a resource explaining why > the _FILES array is structured as it is with html arrays. I've been > googling and reading rfc1867.c and finding very little explanation. > > The _FILES[$key]['temp_name'][$key] is quite awkward when dealing with > multiple uploads. > > I found it as a bug, but the only response to someone posting about the > awkwardness was, it is not a bug and will not be fixed. > > I'd just really like to know why the structure is the way it is.. It's > an inconsistency with other html arrays that really confuses me. > > If it's old news, please reply to me off list instead of wasting > valuable developer time on an old discussion. > > .darrel.