01-03-2020, 04:18 AM
I was hoping from the docs here: Treating Environment Variables as Arrays that I could access something in the .env file that used dot syntax as an array but it doesn't seem to work.[url=https://codeigniter4.github.io/userguide/general/configuration.html#treating-environment-variables-as-arrays][/url]
Here is an example, after copying the env file to .env and uncommenting the database.default section:
$database just contains boolean false.
Is it possible to access everything prefixed with e.g. 'database' as an array?
Thanks.
Here is an example, after copying the env file to .env and uncommenting the database.default section:
PHP Code:
$database = getenv('database');
var_dump($database);
$database just contains boolean false.
Is it possible to access everything prefixed with e.g. 'database' as an array?
Thanks.