Welcome Guest, Not a member yet? Register   Sign In
How / When / How 'env' is parsed?
#1

Dear community,

I was a CodeIgniter 3 user, and now diving into CodeIgniter 4.

I am trying to use 'env' functionality, but even if I un-comment the
line for CI_ENVIRONMENT, the variable ENVIRONMENT value still 'production' in my code.

I have tried
PHP Code:
getenv('CI_ENVIRONMENT'
but it is not defined.

To follow, I have added a variable as the documentation said, MYTEST = "value1" in the 'env' file,
and in a controller, using
PHP Code:
getenv('MYTEST'
returns undefined.

I am probably doing something wrong, thank you for your lights!

glihm
Reply


Messages In This Thread
How / When / How 'env' is parsed? - by glihm - 02-14-2020, 10:34 PM
RE: How / When / How 'env' is parsed? - by glihm - 02-15-2020, 12:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB