ThinkPHP安装

 这是配置的常量  如下:

<?php
  1.a)定义常量 
	define('APP_NAME','APP');
	define('APP_PATH','./APP/');  //这里务必加斜线 因为 文件夹是在 APP中  文件下创建  
	define('APP_DEBUG',true);     //开启APP_DEBUG 文件中的缓存文件会被关闭掉 这种情况下 在写的过程中测试数据的时候 不会出现缓存问题   
	                              //假如网站完善 上线过程中 把 true 改为 false 也就是关闭缓存文件  
	b)加载核心文件 
	i   Include "./ThinkPHP/ThinkPHP.php";

   2. 控制器的位置:
    Blong/APP/Lib/Action
    i   IndexAction.class.php
    在该控制器当中里的 index方法和 add方法 加载的模板位置:
    i   Blong/APP/Tpl/index/index.html
   ii   Blong/APP/Tpl/index/add.html
   3. 访问模块:
    a) Index.php/Index/index(add)
   4. 独立分组:
      a)  前台:
              Index.php/Home/Inex/index
      b)  后台:
              Index.php/Admin/Index/index 
      c)  打开配置文件:
          i   Blong/Conf/config.php 编辑如下:
              1    Return array(
                   a)  'APP_GROUP_LIST'=>'Home,Admin',
                   b)  'DEFAULT_GROUP'=>'Home',
                   c)  'APP_GROUP0_MODE'=>1,
              2    );    
	          d)  创建分组文件夹:
                  i Blong/APP/Modules
                 ii Blong/APP/Modules/Home
                        1. Blong/APP/Modules/Home/Action
                        2. Blong/APP/Modules/Home/Model
                        3. Blong/APP/Modules/Home/Tpl
                        4. Blong/App/Modules/Home/Conf 
                iii Blong/APP/Modules/Admin
                        1. Blong/APP/Modules/Admin/Action
                        2. Blong/APP/Modules/Admin/Model
                        3. Blong/APP/Modules/Admin/Tpl
                        4. Blong/App/Modules/Admin/Conf 

 这是安装成功 我的是 3.12  暂时没有安装过其他版本 

猜你喜欢

转载自blog.csdn.net/feiyucity/article/details/87624165