From d63459736281012302b08ed85c5d07869c0d3dc4 Mon Sep 17 00:00:00 2001 From: xiaoz Date: Tue, 15 Dec 2020 19:01:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E4=BA=9B=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.php | 4 ++++ templates/admin/add_link.php | 2 +- templates/admin/static/embed.js | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 04cbc13..c5cc33b 100644 --- a/index.php +++ b/index.php @@ -14,6 +14,10 @@ $c = strip_tags($c); if( !file_exists('./config.php') ) { exit('

配置文件不存在,请将config.simple.php复制一份并命名为config.php

'); } +//检查数据库是否存在,不存在则复制数据库 +if( !file_exists('./db/onenav.db3') ) { + copy('db/onenav.simple.db3','db/onenav.db3'); +} //载入配置文件 require("./config.php"); diff --git a/templates/admin/add_link.php b/templates/admin/add_link.php index 683b0e9..7737d86 100644 --- a/templates/admin/add_link.php +++ b/templates/admin/add_link.php @@ -19,7 +19,7 @@
- +