PHP

 Home  Computers & Internet  Web Programming PHP
What is PHP?
Echo
Comments
Variables
Constants
Data Types
number_format()
Character Strings
Mathematical Operators
Comparison Operators
Logical Operators
Joining Strings
explode()
implode()
strtolower()
strtoupper()
strlen()
ucfirst()
ucwords()
strrev()
str_replace()
str_repeat()
trim()
strip_tags()
addslashes()
stripslashes()
strpos()
strrpos()
nl2br()
isset()
unset()
empty()
POST
GET
If Statements
If Else Statements
Elseif Statements
Switch Statements
For Loops
While Loops
Do While Loops
Foreach Loops
File Create
File Open
File Read
File Write
File Delete
fgets()
file_get_contents()
Date & Time
$_SERVER
Sessions
Cookies
Arrays

LEARNING MORE ABOUT THE $_SERVER ARRAY IN PHP

PHP automatically stores some useful and important information in the $_SERVER super global array. To see the values of all elements of this array, use a foreach loop as follows:

foreach($_SERVER as $key => $value)

{

echo $key." ".$value."<br>";

}

This will output a whole list of useful server information. You can singly extract the most important as below. Click the links to learn more about these variables:

$_SERVER['HTTP_REFERER']
$_SERVER['HTTP_USER_AGENT']
$_SERVER['REMOTE_ADDR']
$_SERVER['PHP_SELF']
$_SERVER['REQUEST_URI']
$_SERVER['DOCUMENT_ROOT']
$_SERVER['HTTP_HOST']
$_SERVER['QUERY_STRING']
$_SERVER['SCRIPT_FILENAME']




Home | Privacy Policy | Terms Of Use | Contact Us