A simple dotenv component for PHP.
$dotenv = new Dikki\DotEnv\DotEnv(__DIR__, '.env'); // directory where .env is present; second argument is optional
$dotenv->load(); // load the vars from .env file
echo $_ENV['DEBUG']; // or getenv('DEBUG')
A simple dotenv component for PHP.
$dotenv = new Dikki\DotEnv\DotEnv(__DIR__, '.env'); // directory where .env is present; second argument is optional
$dotenv->load(); // load the vars from .env file
echo $_ENV['DEBUG']; // or getenv('DEBUG')