PHP code example of chaoswd / dotenv
1. Go to this page and download the library: Download chaoswd/dotenv library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
chaoswd / dotenv example snippets
haos\Dotenv\Dotenv;
// Automatically loads variables from .env
new Dotenv();
// or use an alternate file location
// new Dotenv(__DIR__ . "/../config");
// Access values with the `env()` helper
echo env('APP_NAME'); // ChaosFramework
echo env('APP_DEBUG', false); // true