From 073ef6a1e71b7cf75042b69c35bfa3c9d46a74c2 Mon Sep 17 00:00:00 2001 From: printempw Date: Sun, 17 Jan 2016 13:55:52 +0800 Subject: [PATCH] fixed problems caused by relative path when require() --- includes/utils.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/utils.class.php b/includes/utils.class.php index 9ac5a18a..12d1a120 100644 --- a/includes/utils.class.php +++ b/includes/utils.class.php @@ -3,9 +3,10 @@ * @Author: printempw * @Date: 2016-01-16 23:01:33 * @Last Modified by: prpr - * @Last Modified time: 2016-01-17 11:31:17 + * @Last Modified time: 2016-01-17 13:48:15 */ -require "./config.php"; +$dir = dirname(dirname(__FILE__)); +require "$dir/config.php"; class utils { private static $connection = null;