You may or may not find any of the following elements in $_SERVER. Note that few, if any, of these will be available (or indeed have any meaning) if running PHP on the command line.
'PHP_SELF' The filename of the currently executing script, relative to the document root. For instance, $_SERVER['PHP_SELF'] in a script at the address http://example.com/foo/bar.php would be /foo/bar.php.
The __FILE__ constant contains the full path and filename of the current (i.e. included) file. If PHP is running...
#
PHP
#
SERVER
#
컬렉션
#
함수
원문 링크 : [PHP] $_SERVER[] 서버 컬렉션