• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How / When / How 'env' is parsed?

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:
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:
returns undefined.

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


Hi, have you renamed your env into .env?

(02-14-2020, 11:46 PM)jreklund Wrote: Hi, have you renamed your env into .env?

... I do apologize for that. Thank you very much jreklund. Smile

No need to apologize, glad it worked out for you! :-)

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.