PHP also makes environment variables available. These are the variables that are created when you start a new shell. Some are the standard variables like PATH. Others are variables defined by the CGI. Examples are REMOTE_ADDR and HTTP_USER_AGENT. These are turned into PHP variables for your convenience. tells you which browser someone is using to surf your page.
Similar to environment variables are the variables the PHP itself creates for you. The first is GLOBALS, which is an associative array of every variable available to the script. Exploring this array will reveal all the environment variables as well as a few other ariables. Similar to GLOBALS are HTTP_GET_VARS, HTTP_POST_VARS, and HTTP_COOKIE_VARS. As their names suggest, these are associative arrays of the variables created by the three methods the browser may use to send information to the server.
The combination of Web server and operating system will define the set of environment variables. You can always write a script to dump the GLOBALS array to see which are available to you. Alternatively, you can simply view the output of the phpinfo function.
Viewing Environment Variables<?
PHP Related Interview Questions
|PHP Interview Questions||MySQL Interview Questions|
|PHP+MySQL Interview Questions||Drupal Interview Questions|
|MYSQL DBA Interview Questions||PHP5 Interview Questions|
|WordPress Interview Questions||Joomla Interview Questions|
|CakePHP Interview Questions||CodeIgniter Interview Questions|
|PHP7 Interview Questions|
An Introduction To Php
Variables, Operators, And Expressions
Classes And Objects
I/o And Disk Access
Time, Date, And Configuration Functions
Parsing And String Evaluation
Sorting Searching And Random Numbers
Integration With Html
Efficiency And Debugging
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.