What is the $_SERVER superglobal in PHP?
- A superglobal variable that contains information about headers, paths, and script locations.
- A superglobal variable that stores user input from form submissions.
- A superglobal variable that holds session data.
- A superglobal variable that contains database connection details.
The $_SERVER superglobal is a PHP predefined associative array that contains information about headers, paths, and script locations. It provides various server and execution environment-related information. The array elements in $_SERVER are created by the web server and can be accessed directly within PHP scripts. Examples of information stored in $_SERVER include the current script filename, server IP address, request method, and user agent. Learn more: https://www.php.net/manual/en/reserved.variables.server.php
Loading...
Related Quiz
- The while loop in PHP tests the condition ______ executing the block of code.
- You need to get the error message of the last JSON operation in your PHP script. How would you do this?
- The = operator in PHP is a type of ______ operator.
- You can use the $_POST superglobal in PHP to get data sent in the URL's query string.
- You need to filter and validate multiple inputs in your PHP script. How would you do this?