diff --git a/public/install.php b/public/install.php index f69d043a..b2b79bf2 100644 --- a/public/install.php +++ b/public/install.php @@ -16,6 +16,7 @@ $app = new App(); if (is_file($app->getRootPath() . '.env') && is_file($app->getRootPath() . 'install.lock')) { header('Location: index.php');exit(); } +session('error', 0); define('ROOT_PATH', $app->getRootPath()); $action = $app->request->param('action', 'index'); @@ -679,7 +680,7 @@ function session($name, $value = false){ if ($name == '') { return false; } - if ($value) { + if (false !== $value) { $_SESSION[$name] = $value; }else{ return isset($_SESSION[$name]) ? $_SESSION[$name] : false; diff --git a/runtime/sql/install.sql b/runtime/sql/install.sql index 585e70b4..acf2bba3 100644 --- a/runtime/sql/install.sql +++ b/runtime/sql/install.sql @@ -460,7 +460,7 @@ CREATE TABLE `sent_member` ( `login` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '登录次数', `reg_ip` bigint(20) NOT NULL DEFAULT '0' COMMENT '注册IP', `reg_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '注册时间', - `last_login_ip` bigint(20) NOT NULL DEFAULT '0' COMMENT '最后登录IP', + `last_login_ip` varchar(30) NOT NULL DEFAULT '0' COMMENT '最后登录IP', `last_login_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最后登录时间', `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '会员状态', PRIMARY KEY (`uid`),