Nominatim/lib/dotenv_loader.php
Sarah Hoffmann 9348fc5e15 move dotenv parsing to installed PHP scripts
This means that the php-symfony-dotenv library is now only needed
when using the legacy scripts. This includes the BDD tests which
currently still rely on the PHP utils.
2021-01-14 18:06:22 +01:00

14 lines
266 B
PHP

<?php
require('Symfony/Component/Dotenv/autoload.php');
function loadDotEnv()
{
$dotenv = new \Symfony\Component\Dotenv\Dotenv();
$dotenv->load(CONST_DataDir.'/settings/env.defaults');
if (file_exists('.env')) {
$dotenv->load('.env');
}
}