PHP Predefined Variables

Server Name: edwar475.soisweb.uwm.edu

PHP File: /infost440/a3/predefined.php

What They Mean

$_SERVER['SERVER_NAME'] gives the name of the server hosting the page. $_SERVER['PHP_SELF'] gives the filename or path of the PHP script that is currently running.

Explanation

Predefined variables are variables that PHP automatically makes available to programmers. They can provide information about things such as the server, request, files, cookies, and sessions. I do not have to create these variables myself because PHP already defines them and provides their values when the page runs.

Back to Activity 3