c3f882960c
This commit changes how the config class gets it's values to a more solid way. Additonally, the DSN was updated to use a correct format, allowing PDO to connect (With a wrong DSN, it tries to connect to something that doesn't exist).
25 lines
428 B
PHP
25 lines
428 B
PHP
<?php
|
|
|
|
class Config
|
|
{
|
|
public $config;
|
|
|
|
// Load configuration and upload it to the main class elements
|
|
public function __construct()
|
|
{
|
|
$ROOT = $_SERVER['DOCUMENT_ROOT'];
|
|
$config = $ROOT . "/source/config.ini";
|
|
|
|
$this->config = parse_ini_file($config, true);
|
|
|
|
|
|
|
|
}
|
|
|
|
public function getConfig()
|
|
{
|
|
return $this->config;
|
|
}
|
|
|
|
}
|