首页 > 代码库 > thinkphp条用函数与类库
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();
}
}
thinkphp条用函数与类库
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。