Skip to content

Commit

Permalink
load db settings from config-include
Browse files Browse the repository at this point in the history
  • Loading branch information
mojoaxel committed Nov 10, 2014
1 parent a457a89 commit 6fd1714
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions index.php
Expand Up @@ -180,10 +180,7 @@ class db {
private static $instance = NULL;
public static function getInstance() {
if (!self::$instance) {
global $mysql_server;
global $mysql_db;
global $mysql_user;
global $mysql_pass;
require ("config.inc.php");
self::$instance = new PDO("mysql:host=$mysql_server;dbname=$mysql_db", $mysql_user, $mysql_pass);;
self::$instance->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
Expand Down

0 comments on commit 6fd1714

Please sign in to comment.