<?php
	
	$_ENV = array();
	$handle = fopen("../.env", "r");
	if($handle) {
	    while (($line = fgets($handle)) !== false) {
	      if( strpos($line,"=") !== false) {
	        $var = explode("=",$line);
	        $_ENV[$var[0]] = trim($var[1]);
	        }
	    }
	    fclose($handle);
	} else { die('error opening .env'); }

	$db_host = $_ENV["DB_HOST"];
	$db_name = $_ENV["DB_DATABASE"];
	$db_user = $_ENV["DB_USERNAME"];
	$db_pass = $_ENV["DB_PASSWORD"];	

?>