1. ThinkPHP Events
On April 27, 2017, ThinkPHP5.1-beta.1 was released
On December 31, 2017, ThinkPHP5.1.0 was released, marking the 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 I listen to first?
Let me tell you the bad news first: There will never be ThinkPHP5.2 in the world again!
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
Achieved multi-application support
Comprehensive introduction of 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’s smart prompts more accurate
For the original version Some functions and class methods have been unified and streamlined
3. Environmental requirements and source code download
3.1 Environmental 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 download La
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://m.sbmmt.com/code/30828.html
Git tutorial: //m.sbmmt.com/tool/git/
The most commonly used and officially recommended Composer# is below ##Methods to download the framework source code
4.1 Mac / Linux
// 1. 下载composer.phar:
curl -sS https://getcomposer.org/installer | php
// 2. 将 composer 命令移动到bin目录,使之全局可用
mv composer.phar /usr/local/bin/composer
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
Open https://www.phpcomposer.com/: Download the setup.exe installation program
Enter the command
composerin the terminal. If you see the command prompt message, it means the installation is successful
4.4 updated versioncomposer selfupdate // 终端执行该命令将composer更新到最新版
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, which will go to 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.0
##The following are 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!After the download is completed, open the project directory, for example: tp6, you can see the following directory structure:
command test
It’s 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`
Open browsing according to the prompts device, enter:
127.0.0.1:8000or localhost:8000 in the address bar, the following interface will be displayed
Congratulations, the ThinkPHP6 framework has been installed successfully~~
Want to experience TinkPHP6 now? Download the source code and click here:
Related reference recommendations:
1.2. ThinkPHP6.0 Quick Start (Video Tutorial) 3. ThinkPHP6.0 Complete Development Manual (Official Version)
ThinkPHP6.0 version is officially released, fully embracing component development trend
奔跑者2019-05-14 14:53:29
tp6 It’s not possible to export excel using the header. Does anyone know what’s going on? I’m waiting online. Urgent, I’m using it in the project.
缠中说禅2019-04-17 14:54:10
Although I am a beginner in PHP and have played front-end before, I still hope to learn more about Mr. Zhu’s courses and support you
天蓬老师2019-04-08 15:52:17
The debate between component development and framework development in PHP has never stopped in recent years. Now that the framework has also been componentized, this debate can be put to an end for the time being~~
New ThinkPHP6 framework, source code It has achieved componentized loading and is seamlessly connected with the models of international mainstream frameworks (such as laravel). It will definitely become a strong competitor of the frameworks of international major manufacturers~~
php Chinese website will be launched in a timely manner according to the needs of small partners. ThinkPHP6 series of graphic tutorials, welcome everyone to roar below, let us continue this public welfare