From c5810f7bd762b7ec8b22d577a3a2aeeb8fc79b3d Mon Sep 17 00:00:00 2001 From: wispx <1591788658@qq.com> Date: Thu, 3 Jan 2019 11:55:59 +0800 Subject: [PATCH] up --- .env | 4 ++++ application/index/controller/Install.php | 4 ++-- application/index/view/install/update.html | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 .env diff --git a/.env b/.env new file mode 100644 index 00000000..9c13fa88 --- /dev/null +++ b/.env @@ -0,0 +1,4 @@ +[APP] +NAME = Lsky Pro +DEBUG = true +TRACE = false diff --git a/application/index/controller/Install.php b/application/index/controller/Install.php index 1a5c942d..557e020e 100644 --- a/application/index/controller/Install.php +++ b/application/index/controller/Install.php @@ -244,8 +244,8 @@ EOT; foreach (explode(';', $file) as $value) { if ($value && !ctype_space($value)) { - if (!$mysqli->query($value . ';')) { - throw new Exception('数据导入失败,错误信息:' . $mysqli->error . ',sql语句:' . $value); + if (!$mysqli->query(trim($value))) { + throw new Exception('

数据导入失败!

错误信息:
' . $mysqli->error . '

sql语句:
' . $value . '

'); } } } diff --git a/application/index/view/install/update.html b/application/index/view/install/update.html index a1fda2dc..4551795e 100644 --- a/application/index/view/install/update.html +++ b/application/index/view/install/update.html @@ -34,7 +34,7 @@

- 数据库结构更新准备就绪

{if $msg} -

{$msg|raw}

+
{$msg|raw}
{/if} {if $code eq 0}