首页 > 其他分享 >tp6的相关命令(随时更新)

tp6的相关命令(随时更新)

时间:2023-10-07 17:11:37浏览次数:35  
标签:admin 更新 tp6 composer topthink 随时 php think

前提:

执行前要在cmd下在命令行下切换到你的WEB根目录

 

新建一个名为tp的tp6框架

composer create-project topthink/think tp

 

测试是否安装成功:

php think run

执行后在浏览器打开127.0.0.1:8000,出现下图就算成功

 

 

设置为多应用模式

composer require topthink/think-multi-app

注意,执行完后要删除app下的controller文件夹,不然还是单应用模式

 

安装think-view 模板引擎驱动

composer require topthink/think-view

 

创建admin应用下的index控制器(如果没有admin应用也会自动创建)

php think make:controller admin@index

 安装think-captcha扩展包(验证码) 注:需要在 middleware.php中开启 'think\middleware\SessionInit'才能使用

composer require topthink/think-captcha

 

标签:admin,更新,tp6,composer,topthink,随时,php,think
From: https://www.cnblogs.com/zhengyb-bolg/p/17746767.html

相关文章