thinkphp类的调用 1、在controller下新建一个类,类的名称必须按照tp的规范来写。 2、在需要调用的类中,只需new一下被调用的类名。 1 $t=new DataController(); 2 $t->m();