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

  • 相关阅读:
    docker 001 简介
    Golang 学习笔记 003 标识符、变量和常量
    Golang 学习笔记 002 第一个 go 程序
    Golang 学习笔记 001 环境部署
    nginx配置url中带问号的rewrite跳转
    北京市图书馆免费入口
    编译安装Python3
    Python—进程、线程、协程
    Python—I/O多路复用
    Python—Socket
  • 原文地址:https://www.cnblogs.com/betobe/p/10428565.html
Copyright © 2011-2022 走看看