From 7831d9dfb63ff44474b52f883c1b9fa935affbd6 Mon Sep 17 00:00:00 2001 From: thisgun Date: Tue, 5 Dec 2017 17:10:55 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B0=80=EB=B9=84=EC=95=84=20=ED=98=B8?= =?UTF-8?q?=EC=8A=A4=ED=8C=85=EC=97=90=EC=84=9C=20=EC=84=A4=EC=B9=98?= =?UTF-8?q?=EC=8B=9C=20=EC=97=90=EB=9F=AC=20=EB=AC=B8=EC=A0=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common.php b/common.php index 89fdef84a..acf9a345a 100644 --- a/common.php +++ b/common.php @@ -29,7 +29,8 @@ for ($i=0; $i<$ext_cnt; $i++) { function g5_path() { - $result['path'] = str_replace('\\', '/', dirname(__FILE__)); + $chroot = substr($_SERVER['SCRIPT_FILENAME'], 0, strpos($_SERVER['SCRIPT_FILENAME'], dirname(__FILE__))); + $result['path'] = str_replace('\\', '/', $chroot.dirname(__FILE__)); $tilde_remove = preg_replace('/^\/\~[^\/]+(.*)$/', '$1', $_SERVER['SCRIPT_NAME']); $document_root = str_replace($tilde_remove, '', $_SERVER['SCRIPT_FILENAME']); $pattern = '/' . preg_quote($document_root, '/') . '/i';