How does one set Environment Variables in MAMP Pro when using Nginx?
Existing questions on Stack Overflow focus on an Apache implementation: Setting Environment Variables in MAMP?
These variables need to be retrievable from PHP using \getenv()
My attempted solution is the following:
and in PHP:
<?php
\var_dump( \getenv('DB_DSN') );
//outputs 'bool(false)'
from Setting Environment Variables in MAMP Pro (Nginx)

No comments:
Post a Comment