Force local project database user/password setup
This commit is contained in:
parent
6a4d9be05a
commit
0f1a7d2f09
|
@ -1,4 +1,6 @@
|
|||
node_modules/
|
||||
.cache/
|
||||
dist/
|
||||
vendor/
|
||||
vendor/
|
||||
|
||||
src/php/api/config.php
|
|
@ -1,9 +1,11 @@
|
|||
<?php
|
||||
require_once('./config.php');
|
||||
|
||||
class Db {
|
||||
private $dbh;
|
||||
public $last_error_info;
|
||||
function __construct() {
|
||||
$this->dbh = new PDO('mysql:host=localhost;dbname=lexiconga;charset=utf8', 'root', '');
|
||||
$this->dbh = new PDO('mysql:host=localhost;dbname=lexiconga;charset=utf8', DB_USER, DB_PASSWORD);
|
||||
$this->dbh->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
|
||||
$this->last_error_info = null;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
<?php
|
||||
|
||||
define('DB_USER', 'lexiconga_db_username');
|
||||
define('DB_PASSWORD', 'user_password');
|
Loading…
Reference in New Issue