Accessing Environment Variables3:50 with Alena Holligan
Environment variable changes based on the current system. There are a number of environment variables that are set by default, which we can access right away. We'll look at what they are and how we can use them.
Learn About Your Environment
phpinfo allows us to gather a lot of information about our environment. Among these details, we can see the version of PHP that is being run and the default environment variable that are set. Check the section for "Apache Environment" and "Additional Modules".
getenv — Gets the value of an environment variable.
string getenv ( string $varname [, bool $local_only = FALSE ] )
You need to sign up for Treehouse in order to download course files.Sign up