源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

thinkPHP简单调用函数与类库的方法

  • 时间:2020-11-09 05:35 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:thinkPHP简单调用函数与类库的方法
本文实例讲述了thinkPHP调用函数与类库的方法。分享给大家供大家参考,具体如下: 手册上说的很冗余,没看懂,下面简单的讲一下具体用法。 [b]函数调用:[/b] lib公共函数库叫 [code]common.php[/code] App/common/common.php 分组模块下的公共函数库叫 [code]function.php[/code] App/Modules/Admin/common/function.php [b]类库调用:[/b]
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相关内容感兴趣的读者可查看本站专题:《[url=http://www.1sucai.cn/Special/39.htm]ThinkPHP入门教程[/url]》、《[url=http://www.1sucai.cn/Special/853.htm]thinkPHP模板操作技巧总结[/url]》、《[url=http://www.1sucai.cn/Special/129.htm]ThinkPHP常用方法总结[/url]》、《[url=http://www.1sucai.cn/Special/32.htm]codeigniter入门教程[/url]》、《[url=http://www.1sucai.cn/Special/445.htm]CI(CodeIgniter)框架进阶教程[/url]》、《[url=http://www.1sucai.cn/Special/546.htm]Zend FrameWork框架入门教程[/url]》、《[url=http://www.1sucai.cn/Special/26.htm]smarty模板入门基础教程[/url]》及《[url=http://www.1sucai.cn/Special/350.htm]PHP模板技术总结[/url]》。 希望本文所述对大家基于ThinkPHP框架的PHP程序设计有所帮助。
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部