mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-21 06:19:38 +08:00
fixed bugs of checking config caused by
This commit is contained in:
parent
63ccf02f3b
commit
fe94a22669
@ -3,7 +3,7 @@
|
|||||||
* @Author: printempw
|
* @Author: printempw
|
||||||
* @Date: 2016-02-02 21:59:06
|
* @Date: 2016-02-02 21:59:06
|
||||||
* @Last Modified by: printempw
|
* @Last Modified by: printempw
|
||||||
* @Last Modified time: 2016-03-18 18:43:11
|
* @Last Modified time: 2016-03-18 18:47:20
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Database;
|
namespace Database;
|
||||||
@ -29,7 +29,7 @@ class Database implements EncryptInterface, SyncInterface
|
|||||||
if ($conn->connect_error)
|
if ($conn->connect_error)
|
||||||
Utils::showErrorPage($conn->connect_errno,
|
Utils::showErrorPage($conn->connect_errno,
|
||||||
"无法连接至 MySQL 服务器。请确认 config.php 中的配置是否正确:".$conn->connect_error);
|
"无法连接至 MySQL 服务器。请确认 config.php 中的配置是否正确:".$conn->connect_error);
|
||||||
if (self::checkTableExist($conn))
|
if (!self::checkTableExist($conn))
|
||||||
Utils::showErrorPage(-1, "数据库中不存在 ".DB_PREFIX."users 或 ".DB_PREFIX."options 表。请先运行 /admin/install.php 进行安装。");
|
Utils::showErrorPage(-1, "数据库中不存在 ".DB_PREFIX."users 或 ".DB_PREFIX."options 表。请先运行 /admin/install.php 进行安装。");
|
||||||
if (!is_dir(BASE_DIR."/textures/"))
|
if (!is_dir(BASE_DIR."/textures/"))
|
||||||
Utils::showErrorPage(-1, "textures 文件夹不存在。请先运行 /admin/install.php 进行安装,或者手动放置一个。");
|
Utils::showErrorPage(-1, "textures 文件夹不存在。请先运行 /admin/install.php 进行安装,或者手动放置一个。");
|
||||||
|
@ -3,11 +3,12 @@
|
|||||||
* @Author: prpr
|
* @Author: prpr
|
||||||
* @Date: 2016-02-06 23:18:49
|
* @Date: 2016-02-06 23:18:49
|
||||||
* @Last Modified by: printempw
|
* @Last Modified by: printempw
|
||||||
* @Last Modified time: 2016-03-18 17:46:22
|
* @Last Modified time: 2016-03-18 18:45:48
|
||||||
*/
|
*/
|
||||||
session_start();
|
session_start();
|
||||||
$dir = dirname(dirname(__FILE__));
|
$dir = dirname(dirname(__FILE__));
|
||||||
require "$dir/includes/autoloader.php";
|
require "$dir/includes/autoloader.php";
|
||||||
|
Database\Database::checkConfig();
|
||||||
|
|
||||||
if(isset($_COOKIE['uname']) && isset($_COOKIE['token'])) {
|
if(isset($_COOKIE['uname']) && isset($_COOKIE['token'])) {
|
||||||
$_SESSION['uname'] = $_COOKIE['uname'];
|
$_SESSION['uname'] = $_COOKIE['uname'];
|
||||||
|
Loading…
Reference in New Issue
Block a user