spacejewel-ipn-communication/source/helpers/ConfigHelper/class.Config.php
Miguel Nogueira c3f882960c Change wrong DSN name for db wrapper and update config class
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).
2018-06-08 18:58:48 +00:00

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;
}
}