Home > PHP Framework > ThinkPHP > body text

Is thinkphp6 online?

步履不停
Release: 2019-06-20 14:00:56
Original
9530 people have browsed it

Is thinkphp6 online?

TinkPHP6 is currently online. To download the source code, click here: //m.sbmmt.com/xiazai/code/5685

1. ThinkPHP Important Events

  • ##On April 27, 2017, ThinkPHP5.1-beta.1 was released

  • On December 31, 2017, ThinkPHP5.1.0 was released, marking a rapid entry into the iteration period

  • On March 3, 2019, ThinkPHP5. 1 has been updated to the 35th version (5.1.35)

  • On March 22, 2019, the dev development version of ThinkPHP5.2 was also released

Now let me tell you good news and bad news, which one should you listen to first?

Let me tell you the bad news first:

There will never be ThinkPHP5.2 in the world again. La!

Good news:

ThinkPHP5.2 has been officially renamed ThinkPHP6.0


2 . Core functions and main features

  • Comprehensive support for the use of PHP7 strong type features

  • Comprehensive support for almost all PSR development specifications

  • Achieve multi-application support

  • Comprehensively introduce event system alternative behavior

  • New application service architecture

  • The view and template engine are separated, and the project configuration is more flexible

  • IDE assistant makes the editor smart prompt more accurate

  • Some functions and class methods of the original version have been unified and streamlined


3. Environmental requirements and source code download

3.1 Environment requirements: PHP 7.1

2.2 Source code download

As we all know, starting from ThinkPHP5.1, The official website no longer provides framework source code downloads

So, of course, ThinkPHP6.0 (hereinafter referred to as TP6) cannot be downloaded from the official website

Where can I download it? Two ways

Composer and Git

Reference

Composer download and installation tutorial:

http://www.php. cn/code/30828.html

Git tutorial:

//m.sbmmt.com/tool/git/

The following are the most commonly used, It is also the officially recommended

Composer method to download the framework source code


4. Composer download and installation

##4.1 Mac / Linux

// 1. 下载composer.phar:
curl -sS https://getcomposer.org/installer | php

// 2. 将 composer 命令移动到bin目录,使之全局可用
mv composer.phar /usr/local/bin/composer
Copy after login

Note:

For MacOS 10.14, the user/local/bin folder does not exist and needs to be created manually

// 3. 设置中国全量镜像,提升访问速度
composer config -g repo.packagist composer https://packagist.phpcomposer.com

// 如果上面错误存在问题,请使用这个镜像地址
composer config -g repo.packagist composer https://packagist.laravel-china.org
Copy after login

4.2 Windows


Open https://www.phpcomposer.com/: Download the setup.exe installation program

4.3 Test

in the terminal Enter:

composer

command, if you see the command prompt message, it means the installation is successful

Is thinkphp6 online?##4.4 updated version

composer selfupdate  // 终端执行该命令将composer更新到最新版
Copy after login

5. TP6 framework source code download

(1) Open Composer official website:https://www.phpcomposer.com/

Open the installation package list, and a jump will occur. It will go to Is thinkphp6 online?https://packagist.org/

Enter the search keyword : topthink, the component packages related to the ThinkPHP framework will be listed below

After opening, you can see the version label and installation instructions of ThinkPHP6.0Is thinkphp6 online?

Is thinkphp6 online?The following is the detailed framework source code download process:

// 打开终端,执行指令:
composer create-project topthink/think tp6 6.0.*-dev

/**
  * 指令中各个参数的解释:
  * `create-project`: 是composer中的项目创建命令
  * `topthink/think`: ThinkPHP的组件包
  * `tp6`: 是当前的项目目录(如果没有创建, 该命令会自动创建的)
  * `6.0.*-dev`: 要下载的版本标签
  */
  
// 以下是源码的下载中的提示信息
Installing topthink/think (6.0.x-dev 9ea8d9fd39a1aac440fd355cf8b4361130267bce)
- Installing topthink/think (6.0.x-dev 9ea8d9f):
Cloning 9ea8d9fd39
- Installing topthink/think (6.0.x-dev 9ea8d9f): Downloading (100%)
Created project in tp
Loading composer repositories with package information
Updating dependencies (including require-dev)

Package operations: 9 installs, 0 updates, 0 removals
- Installing topthink/think-installer (v2.0.0): Downloading (100%)
- Installing opis/closure (3.1.6): Downloading (100%)
- Installing psr/simple-cache (1.0.1): Downloading (100%)
- Installing psr/log (1.1.0): Downloading (100%)
- Installing psr/container (1.0.0): Downloading (100%)
- Installing psr/cache (1.0.1): Downloading (100%)
- Installing topthink/framework (6.0.x-dev e9af162): Downloading (100%)
- Installing topthink/think-template (v2.0.1): Downloading (100%)
- Installing topthink/think-view (v1.0.5): Downloading (100%)
Writing lock file
Generating autoload files

> @php think service:discover
Succeed!
> @php think vendor:publish
Succeed!
Copy after login
After the download is completed, open the project directory, for example: tp6, you can see the following directory Structure:

Is thinkphp6 online?



# 6. Framework test

Here we use the framework’s built-in

think
    command test
  • This command will start a local temporary Web server with the same function as

    php -S localhost:8000
  • is the same
  • The detailed steps are as follows:

    // 1. 打开终端工具, 切换到当前的Web目录下面
    
    // 2. 进入tp6项目目录
    cd tp6
    
    // 3. 创建本地服务器, 启动框架
    php think run
    
    // 提示用户在本机的8000商品开启了一个Web服务
    ThinkPHP Development server is started On <http://127.0.0.1:8000/>
    You can exit with `CTRL-C`
    Copy after login

    根据提示打开浏览器, 在地址栏输入:

    127.0.0.1:8000  或者 localhost:8000 ,显示如下界面

    Is thinkphp6 online?

    恭喜, ThinkPHP6 框架已经安装成功~~

    相关参考推荐:
    1. ThinkPHP6.0版本正式发布,全面拥抱组件化开发趋势

    2. ThinkPHP6.0极速入门(视频教程)

    3. ThinkPHP6.0完全开发手册(官方版)

    The above is the detailed content of Is thinkphp6 online?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template