superglobals Flashcards Preview

php > superglobals > Flashcards

Flashcards in superglobals Deck (10)
Loading flashcards...
1
Q

$GLOBALS

A

All variables that are currently defined in the global scope of the script. The variable names are the keys of the array.

2
Q

$_SERVER

A

Information such as headers, paths, and script locations. The entries in this array are created by the web server and there is no guarantee that every web server will provide any or all of these.

3
Q

$_GET

A

Variables passed to the current script via the HTTP GET method.

4
Q

$_POST

A

Variables passed to the current script via the HTTP POST method.

5
Q

$_FILES

A

Items uploaded to the current script via the HTTP POST method.

6
Q

$_COOKIE

A

Variables passed to the current script via HTTP cookies.

7
Q

$_SESSION

A

Session variables available to the current script.

8
Q

$_REQUEST

A

Contents of information passed from the browser; by default, $_GET, $_POST, and $_COOKIE.

9
Q

$_ENV

A

Variables passed to the current script via the environment method.

10
Q

htmlentities

A

converts all characters into HTML entities. To access $_SERVER for example the syntax is:
$came_from = htmlentites($_SERVER[‘HTTP_REFERER’]);