Skip to content

Instantly share code, notes, and snippets.

@oskarcalvo
Created April 24, 2018 20:25
Show Gist options
  • Save oskarcalvo/ddf1e5ec2269e3b9df6d2d456e5587bf to your computer and use it in GitHub Desktop.
Save oskarcalvo/ddf1e5ec2269e3b9df6d2d456e5587bf to your computer and use it in GitHub Desktop.
<?php
/**
* This file is included very early. See autoload.files in composer.json and
* https://getcomposer.org/doc/04-schema.md#files
*/
use Dotenv\Dotenv;
use Dotenv\Exception\InvalidPathException;
/**
* Load any .env file. See /.env.example.
*/
$dotenv = new Dotenv(__DIR__);
try {
$dotenv->load();
}
catch (InvalidPathException $e) {
// Do nothing. Production environments rarely use .env files.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment