zoukankan      html  css  js  c++  java
  • 开启tp3.2.3的Admin模块

    默认生成Admin模块

    1)定义应用名称及定义绑定Admin模块,运行项目可生成Admin模块

    <?php
    // +----------------------------------------------------------------------
    // | ThinkPHP [ WE CAN DO IT JUST THINK ]
    // +----------------------------------------------------------------------
    // | Copyright (c) 2006-2014 http://thinkphp.cn All rights reserved.
    // +----------------------------------------------------------------------
    // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
    // +----------------------------------------------------------------------
    // | Author: liu21st <liu21st@gmail.com>
    // +----------------------------------------------------------------------
    
    // 应用入口文件
    
    // 检测PHP环境
    if(version_compare(PHP_VERSION,'5.3.0','<'))  die('require PHP > 5.3.0 !');
    
    // 开启调试模式 建议开发阶段开启 部署阶段注释或者设为false
    define('APP_DEBUG',True);
    // 定义应用名称
    define('APP_NAME','./Application/');
    // 定义应用目录
    define('APP_PATH','./Application/');
    //定义后台生成Admin模块
    define('BIND_MODULE','Admin');
    // 引入ThinkPHP入口文件
    require './ThinkPHP/ThinkPHP.php';

    2)去掉 define('BIND_MODULE','Admin'); 后,可以使用ThinkPHP路由模式

    普通模式 访问 http://localhost:8888/index.php?m=Home&c=index&a=index

    兼容模式 http://localhost:8888/index.php?s=Home/index/index

    pathinfo模式 http://localhost:8888/index.php/home/index/index

    rewrite模式 http://localhost:8888/index.php/home/index/index

  • 相关阅读:
    lamp
    ssh 交互脚本
    mysql 备份检测主从脚本
    RANDOM 猜数字脚本
    ansible+playbook 搭建lnmp环境
    集群搭建
    grafana
    nginx lnmp搭建
    shell 基础(1): 变量
    seq 增量输出命令
  • 原文地址:https://www.cnblogs.com/betobe/p/10428565.html
Copyright © 2011-2022 走看看