update
This commit is contained in:
+7
-4
@@ -285,15 +285,18 @@ function api_upload()
|
||||
// common func start
|
||||
function init()
|
||||
{
|
||||
define("BASE_PATH", __DIR__ . "/../");
|
||||
define("CONFIG_PATH", BASE_PATH . "/./config/");
|
||||
define("PUBLIC_PATH", BASE_PATH . "/./public/");
|
||||
define("DATA_PATH", BASE_PATH . "/./data/");
|
||||
|
||||
|
||||
$db = new SQLite3(DATA_PATH . 'data.db');
|
||||
// 创建表
|
||||
$db->exec('CREATE TABLE IF NOT EXISTS files (id INTEGER PRIMARY KEY, uuid TEXT, src TEXT)');
|
||||
$db->close();
|
||||
|
||||
define("BASE_PATH", __DIR__ . "/../");
|
||||
define("CONFIG_PATH", BASE_PATH . "/./config/");
|
||||
define("PUBLIC_PATH", BASE_PATH . "/./public/");
|
||||
define("DATA_PATH", BASE_PATH . "/./data/");
|
||||
|
||||
empty($_SERVER['REQUEST_URI']) || $_SERVER['REQUEST_URI'] == "/" && $_SERVER['REQUEST_URI'] = "/index";
|
||||
|
||||
check_api();
|
||||
|
||||
Reference in New Issue
Block a user