O'Reilly logo

Sams Teach Yourself PHP in 24 Hours, Third Edition by Matt Zandstra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Server Variables Revisited

You have already encountered the predefined elements that PHP, in conjunction with your server, stores in the superglobal $_SERVER array. Generally, $_SERVER elements are made available to PHP by the server (or the shell if you are running a script from the command line). If you are running Apache, all the elements we discuss will likely be accessible to you. If you are running another server, there is no guarantee that $_SERVER will have been populated with all the elements discussed in this hour, so you should check before using them in scripts. Table 14.1 lists some of the $_SERVER elements you might be able to use to find out more about your visitors (see Table 10.1 for a more complete list of $_SERVER elements). ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required