reference the config file without relying on working directory

This commit is contained in:
Daniel Winzen
2020-10-15 21:29:49 +02:00
parent e61be13015
commit 1827382524
16 changed files with 16 additions and 16 deletions

View File

@ -23,7 +23,7 @@ use JetBrains\PhpStorm\ExitPoint;
if($_SERVER['REQUEST_METHOD']==='HEAD'){
exit; // ignore headers, no further processing needed
}
require_once('../common_config.php');
require_once(__DIR__.'/../common_config.php');
try{
$db=new PDO('mysql:host=' . DBHOST . ';dbname=' . DBNAME . ';charset=utf8mb4', DBUSER, DBPASS, [PDO::ATTR_ERRMODE=>PDO::ERRMODE_WARNING, PDO::ATTR_PERSISTENT=>PERSISTENT]);
}catch(PDOException $e){