Re: What are an Environment Variables in PHP?
A large number of predefined variables to all scripts are provided by the PHP. The things like built-in environment variables, last error messages to last retrieved headers are represented by the variables from an external; variables.For accessing an environment variables from php, there are two ways :
- By using the function getenv() which will work from the CLI as well as via http.
- You can use the global array HTTP_ENV_VARS where all environment variables are exported, if you're using PHP via HTTP. But for doing this you need to declare this as a global identifier.
I do to dead flowers what people at morgues do to dead people. Suck all the moisture out, dip them in plastic, paint them up pretty and put them in a nice frame.
Bookmarks