From a2063b6194efb643bfb31d5ae4f00143d11a530f Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 2 Feb 2016 14:30:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BLoader=E7=B1=BB=E7=9A=84autol?= =?UTF-8?q?oad=E6=96=B9=E6=B3=95=E4=B8=80=E5=A4=84=E8=AD=A6=E5=91=8A?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Loader.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/think/Loader.php b/library/think/Loader.php index fb58e6ce..6391c0c4 100644 --- a/library/think/Loader.php +++ b/library/think/Loader.php @@ -42,6 +42,9 @@ class Loader include $file; } else { // 命名空间自动加载 + if (!strpos($class, '\\')) { + return; + } list($name, $class) = explode('\\', $class, 2); if (isset(self::$namespace[$name])) { // 注册的命名空间