Re: $_FILES passed by value
| From: | Rob Adams | Date: | Thu, 03 Jun 2004 15:08:22 +0000 |
| Subject: | Re: $_FILES passed by value | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-187538@lists.php.net to get a copy of this message | ||
"Daniel Guerrier" <dan_guerrier@yahoo.com> wrote in message
news:20040603145413.71652.qmail@web52002.mail.yahoo.com...
> If I pass a $_FILES to an object by value. Does it
> create a copy of the actual posted files as well?
>
> In other words if I post a 2MB file to save.php and in
> turn pass $_FILES to an object $file->fileis($_FILES);
> Does that create 4MB of data in memory?
$_FILES is a super global. You really shouldn't have to pass it anywhere...
It doesn't contain the actual file, just information about the file. IE.
size
name
tmp_name
type
So if you do make a copy if it, you aren't copying the actual file that was
uploaded, just an array of information.
-- Rob