From fa714b9436501539e7991108361234ae2e7d01df Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 25 Jul 2024 10:46:54 +0800 Subject: [PATCH] 1 --- webapp/index.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/webapp/index.php b/webapp/index.php index b6263b95..f1a7ab11 100644 --- a/webapp/index.php +++ b/webapp/index.php @@ -11,7 +11,13 @@ if (empty($_REQUEST['c']) || empty($_REQUEST['a'])) { function autoload_controller__($classname) { - require_once "controller/$classname.class.php"; + $fileName = "controller/$classname.class.php"; + if (!file_exists($fileName)) { + if (SERVER_ENV == _ONLINE) { + die(); + } + } + require_once $fileName; spl_autoload_unregister('autoload_controller__'); } spl_autoload_register('autoload_controller__');