Corrected error that occured after splitting config into separate file.
This commit is contained in:
parent
86cb486637
commit
0fc03a39e0
@ -1,16 +1,16 @@
|
||||
<?php
|
||||
|
||||
require_once("shoppingListConfig.php");
|
||||
|
||||
class DBLink
|
||||
{
|
||||
require_once("shoppingListConfig.php");
|
||||
|
||||
static $sqlLink = null;
|
||||
|
||||
public static function getDbLink()
|
||||
{
|
||||
if(DBLink::$sqlLink == null)
|
||||
{
|
||||
DBLink::$sqlLink = new mysqli(DBLink::$mysqlserver, DBLink::$mysqluser, DBLink::$mysqlpw, DBLink::$mysqldb, DBLink::$mysqlPort);
|
||||
DBLink::$sqlLink = new mysqli(Configuration::$mysqlserver, Configuration::$mysqluser, Configuration::$mysqlpw, Configuration::$mysqldb, Configuration::$mysqlPort);
|
||||
|
||||
// Verbindung überprüfen
|
||||
if (mysqli_connect_errno())
|
||||
|
@ -1,9 +1,11 @@
|
||||
<?php
|
||||
|
||||
static $mysqlserver = 'mysql.mydomain'; //Host
|
||||
static $mysqluser = 'shoppingList'; //User [It's recommended to not use root]
|
||||
static $mysqlpw = 'somePassword'; //Password
|
||||
static $mysqldb = 'shoppingList'; //Database
|
||||
static $mysqlPort = 3306;
|
||||
|
||||
class Configuration
|
||||
{
|
||||
public static $mysqlserver = 'mysql.mydomain'; //Host
|
||||
public static $mysqluser = 'shoppingList'; //User [It's recommended to not use root]
|
||||
public static $mysqlpw = 'somePassword'; //Password
|
||||
public static $mysqldb = 'shoppingList'; //Database
|
||||
public static $mysqlPort = 3306;
|
||||
}
|
||||
?>
|
Loading…
Reference in New Issue
Block a user