Logo
Explore Help
Register Sign In
miguel456/spacejewel-ipn-communication
1
0
Fork 0
You've already forked spacejewel-ipn-communication
Code Issues Pull Requests Releases Wiki Activity
spacejewel-ipn-communication/source/helpers/ConfigHelper/class.Config.php

25 lines
428 B
PHP
Raw Normal View History

Add all code files from IDE
2018-06-07 10:56:13 +00:00
<?php
class Config
{
public $config;
// Load configuration and upload it to the main class elements
public function __construct()
{
$ROOT = $_SERVER['DOCUMENT_ROOT'];
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
$config = $ROOT . "/source/config.ini";
Add all code files from IDE
2018-06-07 10:56:13 +00:00
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
$this->config = parse_ini_file($config, true);
Add all code files from IDE
2018-06-07 10:56:13 +00:00
}
public function getConfig()
{
return $this->config;
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.6 Page: 67ms Template: 6ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API