From 2e1c83690c6e2bba5a8c85986f164db172b6dc3d Mon Sep 17 00:00:00 2001 From: huangdijia Date: Thu, 4 Feb 2016 17:32:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3ORM=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E5=90=8D=E5=9C=A8linux=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/ORM.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/ORM.php b/library/think/ORM.php index 755ffff9..e504a10d 100644 --- a/library/think/ORM.php +++ b/library/think/ORM.php @@ -68,7 +68,7 @@ class ORM public static function __callStatic($method, $params) { - $name = basename(get_called_class()); + $name = basename(str_replace('\\', '/', get_called_class())); if (!isset(self::$instance[$name])) { // 自动实例化模型类 self::$instance[$name] = new \think\Model($name, static::$config);