函数调用:
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();
}
}
以上就是thinkphp简单调用函数与类库的详细内容。