I am currently working on a PHP MVC project and I have come across an issue with loading environment variables from a .env file into the `getenv()` function. I have tried searching for a solution but couldn't find one that specifically relates to using the function in an MVC framework.
I have already created a .env file in the root directory of my project and added all the necessary environment variables. However, when I try to access these variables using `getenv()`, it returns empty values. I have also tried using `$_ENV` but to no avail.
I have double-checked the names of the variables in my .env file, and they match the ones I'm trying to access. I'm quite new to MVC frameworks and I'm not sure if I'm missing any additional steps specific to MVC.
So, if you've encountered a similar situation or have experience working with environment variables in a PHP MVC project, I would greatly appreciate any guidance or suggestions on how to properly load the environment variables into `getenv()`.
Thanks in advance for your help!