From 332aa4341913c0e55e68271b4c185776c3fba37c Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Mon, 2 Dec 2024 22:24:49 +0800 Subject: [PATCH] Update index.py --- plugins/php-guard/index.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/php-guard/index.py b/plugins/php-guard/index.py index 15ee87527..6846179e9 100755 --- a/plugins/php-guard/index.py +++ b/plugins/php-guard/index.py @@ -8,11 +8,12 @@ import re import json import shutil -# reload(sys) -# sys.setdefaultencoding('utf8') +web_dir = os.getcwd() + "/web" +if os.path.exists(web_dir): + sys.path.append(web_dir) + os.chdir(web_dir) -sys.path.append(os.getcwd() + "/class/core") -import mw +import core.mw as mw app_debug = False if mw.isAppleSystem():