PHP code example of garkavenkov / dotenv
1. Go to this page and download the library: Download garkavenkov/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/ */
garkavenkov / dotenv example snippets
otenv\Dotenv;
...
Dotenv::load(path_to_file: dirname(__DIR__));
...
...
Dotenv::load(path_to_file: dirname(__DIR__), env_var: "APP_ENV");
...