Connect to database
This commit is contained in:
parent
44c1d26d89
commit
511de407b0
1 changed files with 22 additions and 3 deletions
25
index.php
25
index.php
|
@ -15,13 +15,32 @@ autoInclude(__DIR__ . '/includes/classes');
|
||||||
autoInclude(__DIR__ . '/includes/functions');
|
autoInclude(__DIR__ . '/includes/functions');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Install
|
* Config / Install
|
||||||
*/
|
*/
|
||||||
$configPath = 'includes/config/config.php';
|
$configPath = 'includes/config/config.php';
|
||||||
|
|
||||||
if (!file_exists($configPath)) {
|
if (file_exists($configPath)) {
|
||||||
}
|
require $configPath;
|
||||||
|
} else {
|
||||||
$page = 'install';
|
$page = 'install';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Database
|
||||||
|
*/
|
||||||
|
if (
|
||||||
|
defined('DATABASE_HOST')
|
||||||
|
&& defined('DATABASE_NAME')
|
||||||
|
&& defined('DATABASE_USER')
|
||||||
|
&& defined('DATABASE_PASSWORD')
|
||||||
|
) {
|
||||||
|
$database = new wishthis\Database(
|
||||||
|
DATABASE_HOST,
|
||||||
|
DATABASE_NAME,
|
||||||
|
DATABASE_USER,
|
||||||
|
DATABASE_PASSWORD
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Page
|
* Page
|
||||||
|
|
Loading…
Reference in a new issue