TinkPHP6 is currently online. To download the source code, click here: //m.sbmmt.com/xiazai/code/5685
1. ThinkPHP Important Events
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
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 downloadsSo, of course, ThinkPHP6.0 (hereinafter referred to as TP6) cannot be downloaded from the official websiteWhere can I download it? Two ways
Composer and Git
ReferenceComposer download and installation tutorial:http://www.php. cn/code/30828.html
Git tutorial:The following are the most commonly used, It is also the officially recommendedComposer 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
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
in the terminal Enter:
composercommand, if you see the command prompt message, it means the installation is successful
##4.4 updated version
composer selfupdate // 终端执行该命令将composer更新到最新版
(1) Open Composer official website:https://www.phpcomposer.com/
Open the installation package list, and a jump will occur. It will go to https://packagist.org/
After opening, you can see the version label and installation instructions of ThinkPHP6.0
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!
# 6. Framework test
Here we use the framework’s built-in
thinkThis command will start a local temporary Web server with the same function as
php -S localhost:8000The 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`
根据提示打开浏览器, 在地址栏输入:
127.0.0.1:8000 或者 localhost:8000 ,显示如下界面
恭喜, ThinkPHP6 框架已经安装成功~~
相关参考推荐:
1. 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!