thinkphp条用函数与类库

 

函数调用:

 

lib公共函数库叫 common.php

App/common/common.php

 

分组模块下的公共函数库叫 function.php

App/Modules/Admin/common/function.php

 

 

类库调用:

class IndexAction extends Action{

    public function index(){

    

     // 调用“扩展基类库” ThinkPHP/Extend/Library/ORG/Util/Test.class.php

     import('ORG.Util.Test');

     $test = new Test();

    

     // 调用“扩展基类库” ThinkPHP/Extend/Library/Com/Util/Test.class.php

     import('Com.Util.Test');

     $test = new Test();

 

     // 调用“核心基类库” ThinkPHP/Lib/Core/Test.class.php

     import('Think.Core.Test');

     $test = new Test();

    

     $this->display();

    }

}

posted @ 2016-09-09 09:34  chinalorin'blogs  阅读(169)  评论(0编辑  收藏  举报