Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

$ SERVER functions

what are they all and what do they do



6:36 am on May 24, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

$_SERVER['SCRIPT_NAME'] = file name after the domain
$_SERVER['SCRIPT_FILENAME'] = complete filename

What are the other ones and what do they do?


8:32 am on May 24, 2012 (gmt 0)

5+ Year Member

These are variables whose values are automatically filled in before your script starts to execute. You can use them anywhere in your scripts. See the list at

If you plan to write a lot of PHP code, you can download the documentation from here: [php.net...]
In Windows, I use the .chm Help file with user notes. In Linux, I use the "many HTML files" version. I find both very usable.


4:09 pm on May 24, 2012 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

A FYI, $_SERVER is one of the PHP superglobals (not functions, $_SERVER is a global array available to any part of a program,) and in other languages are called environment variables. They are extracted, and changed based on, the server software environment.

You can see them any time with


Featured Threads

Hot Threads This Week

Hot Threads This Month