thinphp6常用命令

使用thinkTemplate模板引擎

composer require topthink/think-view

https://www.kancloud.cn/manual/thinkphp6_0/1037613

 

安装多应用模式扩展

composer require topthink/think-multi-app

https://www.kancloud.cn/manual/thinkphp6_0/1297876

 

创建新应用

php think build home

创建新应用后可删除默认的controller目录

 

使用验证码

首先使用Composer安装think-captcha扩展包:

composer require topthink/think-captcha

控制器引入

use think\captcha\facade\Captcha;

生成验证码

public function verify() {

return Captcha::create();

}

验证验证码

if( !Captcha::check($vercode)) {

  return json(['code'=>1001, 'msg'=>'验证码错误');

}

 

使用跳转

https://learnku.com/articles/68006

使用jump后initialize方法失效

https://blog.csdn.net/weixin_44904354/article/details/120820132

 

导入EXCEL

composer require phpoffice/phpexcel

https://blog.csdn.net/sunsineq/article/details/126237580

 

posted @ 2022-08-05 14:32  day959  阅读(22)  评论(0编辑  收藏  举报