首页 > TAG信息列表 > 10LTS

thinkphp6: 给接口api做签名验证(php 8.1.1 / thinkphp v6.0.10LTS )

一,创建middelware和controller liuhongdi@lhdpc:/data/php/admapi$ php think make:middleware CheckSign Middleware:app\middleware\CheckSign created successfully. liuhongdi@lhdpc:/data/php/admapi$ php think make:controller Pay Controller:app\controller\P

thinkphp6: 生成带logo的二维码(php 8.1.1 / thinkphp v6.0.10LTS )

一,qr-code代码库的地址: https://github.com/endroid/qr-code 说明:刘宏缔的架构森林是一个专注架构的博客,地址:https://www.cnblogs.com/architectforest          对应的源码可以访问这里获取: https://github.com/liuhongdi/         或: https://gitee.com/liuho

thinkphp6: 开启强制路由(php 8.1.1 / thinkphp v6.0.10LTS )

一,thinkphp6配置强制路由: 1,修改config/route.php 设置url_route_must一项的值为true 如下: // 是否强制使用路由 //'url_route_must' => false, 'url_route_must' => true, 2,查看修改后的效果: 访问: http://192.168.219.6:8000/article/one

thinkphp6: 使用yac做缓存(php 8.1.1 / thinkphp v6.0.10LTS )

一,访问yac的php代码: 1,创建controller liuhongdi@lhdpc:/data/php/admapi$ php think make:controller Yac Controller:app\controller\Yac created successfully. 2,controller/Yac.php <?php declare (strict_types = 1); namespace app\controller; use think\R

thinkphp6: 用bcrypt加密生成密码(php 8.1.1 / thinkphp v6.0.10LTS )

一,使用bcrypt实现加密和验证的php代码: class Auth extends BaseController { /* *测试用bcrypt方式难证密码 * *@return \think\Response * */ public function testPass() { //原始密码 $origPass = "123456"; echo "ori