Let me introduce to you the PHP predefined variables that are often used in PHP learning. Through predefined variables, you can obtain information such as user sessions, user operating system environment, and local operating system environment.
$_SERVER['SERVER_ADDR'] The IP address of the server where the script is currently running.
$_SERVER['SERVER_NAME'] The name of the server host where the script is currently running.
$_SERVER['REQUEST_METHOD'] The request method when accessing the page.
$_SERVER['REMOTE_ADDR'] The IP address of the user who is browsing the current page.
$_SERVER['REMOTE_HOST'] The host name of the user who is browsing the current page.
$_SERVER['REMOTE_PORT'] The port used by users to connect to the server.
$_SERVER['SCRIPT_FILENAME'] The absolute path of the currently executing script.
$_SERVER['SERVER_PORT'] The port used by the server.
$_SERVER['SERVER_SIGNATURE'] A string containing the server version and virtual host name.
$_SERVER['DOCUMENT_ROOT'] The document root directory where the currently running script is located.
$_COOKIE Information passed to the script through HTTPCookie. These are set by setcookie() when executing the php script.
$_SESSION contains information about all session variables. The $_SESSION variable is mainly used for session control and value transfer between pages.
$_POST Parameter information passed through the post method.
$_GET Parameter information passed through the get method.
$_GLOBALS An array consisting of all defined global variables. The variable name is the index into the array. It can be called a super set of all super variables.