PHP Predefined Variables (預設變數)

頁面初始化即存在的預設變數,作用範圍 (scope) : super global
$GLOBALS
$_GET
$_POST
$_FILE
$_COOKIE
$_SESSION
$_SERVER
<?php var_export($GLOBALS); ?>
伺服器資訊的預設變數,作用範圍 (scope) : super global
$_SERVER['PHP_SELF']
$_SERVER['HTTP_HOST']
$_SERVER['HTTP_USER_AGENT']
$_SERVER['QUERY_STRING']

© 不惑仔 from 2011