1
0

putting database configuration in config dir

This commit is contained in:
Daniel Tartavel 2022-09-09 18:46:09 +02:00
parent 89f68e4aa2
commit b5cf1e1220
2 changed files with 15 additions and 6 deletions

View File

@ -3,15 +3,18 @@ logger(DEBUG, _("Including db.php"));
class db extends mysqli class db extends mysqli
{ {
public $mysqlServer = "127.0.0.1"; // Your production server //public $mysqlServer = "127.0.0.1"; // Your production server
public $username = "moha"; //public $username = "moha";
public $passwd = "MysqlMoha"; //public $passwd = "MysqlMoha";
public $database = "moha"; //public $database = "moha";
public $result; //public $result;
function __construct() function __construct()
{ {
global $testMode; global $testMode, $confDir;
require_once $confDir . "/dbConfig.php";
$flagError = false; $flagError = false;
if ($testMode) if ($testMode)
{ {

6
config/dbConfig.php Normal file
View File

@ -0,0 +1,6 @@
<?php
$mysqlServer = "127.0.0.1"; // Your production server
$username = "moha";
$passwd = "MysqlMoha";
$database = "moha";
?>