.env Questions |
Avoiding .env for production is fine but certainly not a requirement nor a best practice. The point of the .env is two-fold:
Provide a way to differentiate settings across multiple environments, and provide a secure location (e.g. not included in version tracking) for sensitive data. If your variables you want to add fall into either of the categories I’d say it’s a good place. If you’re looking to use it simply as an easy way to load common settings I’d recommend using a Config file instead, as they are only loaded on-demand and have a lot more flexibility as to what you can put in them. As for accessing variables, use the env() command you make it super easy. https://codeigniter4.github.io/CodeIgnit...s.html#env Also check out https://codeigniter4.github.io/CodeIgnit...ments.html |
Messages In This Thread |
.env Questions - by Poetawd - 10-05-2019, 09:04 AM
RE: .env Questions - by dave friend - 10-05-2019, 09:37 AM
RE: .env Questions - by Poetawd - 10-05-2019, 09:55 AM
RE: .env Questions - by dave friend - 10-05-2019, 02:01 PM
RE: .env Questions - by MGatner - 10-05-2019, 04:55 PM
RE: .env Questions - by Poetawd - 10-05-2019, 05:00 PM
RE: .env Questions - by kilishan - 10-05-2019, 08:32 PM
RE: .env Questions - by John_Betong - 10-06-2019, 06:34 AM
RE: .env Questions - by InsiteFX - 10-06-2019, 08:19 AM
RE: .env Questions - by dave friend - 10-06-2019, 09:55 AM
|