Giter Site home page Giter Site logo

zyblog's Introduction

ThinkPHP 6.0

运行环境要求PHP7.1+。

安装

composer create-project topthink/think tp 6.0.*

如果需要更新框架使用

composer update topthink/framework

安装多应用模式

composer require topthink/think-multi-app

创建admin和index应用

php think build admin
php think build index

后台使用X-admin

安装视图模板

composer require topthink/think-view

配置视图替换 项目config文件夹view.php文件

    'tpl_replace_string'=>[
        '__PUBLIC__' => '/',
        '__STATIC__' => '/static'
    ]

安装验证码扩展包

composer require topthink/think-captcha

使用方式

    public function Verify()
    {
        return captcha();
    }
<img src="{:url('admin/Login/Verify')}" onClick="this.src=this.src+'?'+Math.random()">

创建admin应用的中间件,项目admin应用使用应用中间件实现登录和权限验证

php think make:middleware admin\middleware\Check 

创建的文件位置为admin\middleware\Check 坑:命令行创建的middleware命名空间不对

zyblog's People

Contributors

jingxi258 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.