From 53b67150f51e9634c0cf7f88b892a9042af84f38 Mon Sep 17 00:00:00 2001 From: printempw Date: Wed, 3 Feb 2016 15:55:52 +0800 Subject: [PATCH] fixed problem of dir path --- includes/database.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/database.class.php b/includes/database.class.php index 626bfb9e..4f38e8fc 100644 --- a/includes/database.class.php +++ b/includes/database.class.php @@ -3,7 +3,7 @@ * @Author: printempw * @Date: 2016-02-02 21:59:06 * @Last Modified by: prpr - * @Last Modified time: 2016-02-03 15:46:01 + * @Last Modified time: 2016-02-03 15:55:17 */ class database @@ -24,7 +24,8 @@ class database utils::raise(-1, "Looks like that there is no `users` table in your database. ". "Please run `/admin/install.php` first."); } - if (!is_dir("./textures/")) { + $dir = dirname(dirname(__FILE__)); + if (!is_dir("$dir/textures/")) { utils::raise(-1, "No `textures` directory exists. Please run `/admin/install.php` ". "or put one manually."); }