84.0k views
4 votes
It is an array containing information such as headers, paths and script locations wherein it is created by the web server itself

Select one:

a. $_SESSION

b. $_REQUEST

c. $_SERVER

d. PHP_SELF

1 Answer

5 votes

Answer:

c. $_SERVER

Step-by-step explanation:

$_SERVER is an array in PHP containing information about headers, paths, and script locations.

Example usage:

echo $_SERVER['HTTP_HOST'];

This will print information about HTTP_HOST header.

echo $_SERVER['DOCUMENT_ROOT'];

This provides information about document root path.

echo $_SERVER['SCRIPT_FILENAME'];

This provides information about the currently executing script.

User Delgan
by
5.4k points