Initial commit: R0Installer source, patch generator, API backend and build scripts
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/config.php';
|
||||
require_once __DIR__ . '/Medoo.php';
|
||||
|
||||
use Medoo\Medoo;
|
||||
|
||||
function getDb() {
|
||||
static $db = null;
|
||||
if ($db === null) {
|
||||
$db = new Medoo([
|
||||
'type' => DB_TYPE,
|
||||
'host' => DB_HOST,
|
||||
'port' => DB_PORT,
|
||||
'database' => DB_NAME,
|
||||
'username' => DB_USER,
|
||||
'password' => DB_PASS,
|
||||
'charset' => DB_CHARSET,
|
||||
]);
|
||||
}
|
||||
return $db;
|
||||
}
|
||||
Reference in New Issue
Block a user