美文网首页
thinkphp3.1.3 应用分组复习介绍

thinkphp3.1.3 应用分组复习介绍

作者: 小祈祈博客 | 来源:发表于2019-02-13 08:38 被阅读0次

应用分组介绍:

首选建立入口文件和以往一样 

define('APP_NAME','APP');

define('APP_PATH','./App/');

define('APP_DEBUG',true);

require './ThinkPHP/ThinkPHP.php';

?>

在APP文件夹的config文件中写入这行语句

//'开启分组

 'APP_GROUP_LIST'=>'Index,Admin',

   //默认分组

   'DEFAULT_GROUP'=>'Index',

然后在LIB文件夹建立前后台项目Index和Admin

Index文件夹_->IndexAction.class.php

Admin文件夹_->IndexAction.class.php

您如果想单独配置Index或者Admin文件可以单独建议项目名称文件夹

Config文件夹->Index文件夹->config.php

Config文件夹->Admin文件夹->config.php

如果想单独给某一个项目使用函数可以建文件夹:

Common文件夹->Index文件夹->function.php (这里注意是function文件名而不是common文件名)

Common文件夹->Admin件夹->function.php (这里注意是function文件名而不是common文件名)

函数和配置文件夹不是必须建立 但是控制器是必须建立的

相关文章

网友评论

      本文标题:thinkphp3.1.3 应用分组复习介绍

      本文链接:https://www.haomeiwen.com/subject/hacreqtx.html