PHP code example of reneknox / dot-env-loader

1. Go to this page and download the library: Download reneknox/dot-env-loader 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/ */

    

reneknox / dot-env-loader example snippets


  $path = 'test/';
  $file = '.env';
  $envLoader = new EnvLoader($path $file);
  $data = $envLoader->get_data();
  // or
  $data = EnvLoader::load_data($path, $file);