云起工作室 15711107967
thinkphp6
2025-02-06 10:38:54
composer create-project topthink/think myproject

已有项目加载vender
composer install

添加多模式
cd myproject
composer require topthink/think-multi-app

添加板块
必须先删除 controller 文件夹
php think build admin

#启动服务
php think run -p 8080   默认端口为8000

# 模板视图
composer require topthink/think-view

# 应用 token jwt
composer require firebase/php-jwt

# 中文转拼音
composer require overtrue/pinyin

# 短信使用
composer require qcloudsms/qcloudsms_php

# 邮箱使用
composer require phpmailer/phpmailer


captche 验证码
composer require topthink/think-captcha
use think\captcha\facade\Captcha;
class Index {
	public function verify(){
        return Captcha::create();    
    }
}


验证
$captcha = new Captcha();
if( !$captcha->check($value))
{
	// 验证失败
}


或

if( !captcha_check($value ))
{
	// 验证失败
}



'verify'=>[
        'codeSet'=>'1234567890'
    ]
return Captcha::create('verify');