$classname = 'Thing'; $thing = new $classname;
这么普通的语句在thinkphp里面竟然不行,也是醉了。
还有就是使用use导入namespace时,竟然要一个一个导入要用的类。
比如Common\Service中有A,B,C三个类,在Home\Controller中要用A,B,C类时,竟然需要use Common\Service\A;use Common\Service\B; use Common\Service\C;这样导入,不能使用use Common\Service;这样导入,真的得吐槽一下。
最佳答案