I'm struggling a bit with getting my environment variables through to my CodeIgniter project. I'm running an XAMMP localhost server for development. I've tried using the getenv($var);
which half worked, but it's not picking up the variables that I'm exporting in my terminal. I have a feeling that it's picking up the Apache environment rather than my actual local environment.
For instance, if I echo out my $PATH variable in terminal, I get a different output to echo getenv("PATH");
in my code.
Any help or a push in the right direction would be appreciated. Thanks in advance.