Function env
Gets an environment variable from available sources, and provides emulation for unsupported or inconsistent environment variables (i.e. DOCUMENT_ROOT on IIS, or SCRIPT_NAME in CGI mode). Also exposes some additional custom environment information.
Copyright: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
License: MIT License
Link: http://book.cakephp.org/3.0/en/core-libraries/global-constants-and-functions.html#env
Located at Core/functions.php
License: MIT License
Link: http://book.cakephp.org/3.0/en/core-libraries/global-constants-and-functions.html#env
Located at Core/functions.php
env( string $key string $default null )
Parameters summary
string | $key | Environment variable name. |
string | $default = null | Specify a default value in case the environment variable is not defined. |
Returns
-
string|null
Environment variable setting.
© 2005–2016 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
http://api.cakephp.org/3.1/function-env.html