Which of the following is an associative array of items uploaded by the current PHP script via the HTTP POST method?
$_FILES
Correct:
$_FILES
Explanation: Answer option A is correct.
The $_FILES is a super global associative array of items uploaded by the current PHP script via the HTTP POST method. Supergobal variables are built in arrays in PHP, which are available in any scope. A user can access a superglobal array within a function or method without using the global keyword. There are following superglobal arrays in PHP:
Arrays
Description
$_COOKIE
It contains keys and values set as browser cookies.
$_ENV
It contains keys and values set by the script's shell context.
$_FILES
It contains information about uploaded files.
$_GET
It contains keys and values submitted to the script using the HTTP get method.
$_POST
It contains keys and values submitted to the script using the HTTP post method.
$_REQUEST
It contains a combined array containing values from the $_GET, $_POST, and $_COOKIE superglobal arrays.
$GLOBALS
It contains all global variables associated with the current script.
Answer options D, C, and B are incorrect. $_REQUEST, $_ENV, and $_COOKIE does not provide the information about uploaded file.