Source of: /manual/en/reserved.variables.files.php
<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/reserved.variables.inc";
$setup = array (
'home' =>
array (
0 => 'index.php',
1 => 'PHP Manual',
),
'head' =>
array (
0 => 'UTF-8',
1 => 'en',
),
'this' =>
array (
0 => 'reserved.variables.files.php',
1 => '$_FILES',
),
'up' =>
array (
0 => 'reserved.variables.php',
1 => 'Predefined Variables',
),
'prev' =>
array (
0 => 'reserved.variables.post.php',
1 => '$_POST',
),
'next' =>
array (
0 => 'reserved.variables.request.php',
1 => '$_REQUEST',
),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);
manual_header();
?>
<div id="reserved.variables.files" class="refentry">
<div class="refnamediv">
<h1 class="refname">$_FILES</h1>
<h1 class="refname">$HTTP_POST_FILES [deprecated]</h1>
<p class="refpurpose"><span class="refname">$_FILES</span> -- <span class="refname">$HTTP_POST_FILES [deprecated]</span> — <span class="dc-title">HTTP File Upload variables</span></p>
</div>
<a name="reserved.variables.files.description"></a><div class="refsect1 description">
<h3 class="title">Description</h3>
<p class="para">
An associative <a href="language.types.array.php" class="type array">array</a> of items uploaded to the current script
via the HTTP POST method.
</p>
<p class="simpara">
<var class="varname">$HTTP_POST_FILES</var> contains the same initial
information, but is not a <a href="language.variables.superglobals.php" class="link">superglobal</a>.
(Note that <var class="varname">$HTTP_POST_FILES</var> and <var class="varname">$_FILES</var>
are different variables and that PHP handles them as such)
</p>
</div>
<a name="reserved.variables.files.changelog"></a><div class="refsect1 changelog">
<h3 class="title">Changelog</h3>
<p class="para">
</p><table class="doctable informaltable">
<thead valign="middle">
<tr valign="middle">
<th>Version</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="middle" class="tbody">
<tr valign="middle">
<td align="left">4.1.0</td>
<td align="left">
Introduced <var class="varname">$_FILES</var> that deprecated
<var class="varname">$HTTP_POST_FILES</var>.
</td>
</tr>
</tbody>
</table>
<p>
</p>
</div>
<a name="reserved.variables.files.notes"></a><div class="refsect1 notes">
<h3 class="title">Notes</h3>
<blockquote><p><b class="note">Note</b>: This is a 'superglobal', or
automatic global, variable. This simply means that it is available in
all scopes throughout a script. There is no need to do
<strong class="command">global $variable;</strong> to access it within functions or methods.
<br /></p></blockquote>
</div>
<a name="reserved.variables.files.seealso"></a><div class="refsect1 seealso">
<h3 class="title">See Also</h3>
<p class="para">
</p><ul class="simplelist">
<li class="member"><a href="function.move-uploaded-file.php" class="function" rel="rdfs-seeAlso">move_uploaded_file()</a> - Moves an uploaded file to a new location</li>
<li class="member"><a href="features.file-upload.php" class="link">Handling File Uploads</a></li>
</ul><p>
</p>
</div>
</div><?php manual_footer(); ?>