mirror of
https://github.com/Alamantus/Lexiconga.git
synced 2025-04-13 15:10:24 +02:00
Force local project database user/password setup
This commit is contained in:
parent
6a4d9be05a
commit
0f1a7d2f09
3 changed files with 10 additions and 2 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -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;
|
||||
}
|
||||
|
|
4
src/php/api/config.php.changeme
Normal file
4
src/php/api/config.php.changeme
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?php
|
||||
|
||||
define('DB_USER', 'lexiconga_db_username');
|
||||
define('DB_PASSWORD', 'user_password');
|
Loading…
Add table
Reference in a new issue