- 博客(16)
- 收藏
- 关注
原创 laravel + redis 实现排行榜
1.控制器 这里为什么要用redis有序集合 (sorted set) 因为Redis 有序集合和集合一样也是 string 类型元素的集合,且不允许重复的成员。不同的是每个元素都会关联一个 double 类型的分数。redis 正是通过分数来为集合中的成员进行从小到大的排序。有序集合的成员是唯一的,但分数(score)却可以重复。集合是通过哈希表实现的,所以添加,删除,查找的复杂度都是 O(1)。 集合中最大的成员数为 232- 1 (4294967295,...
2022-04-11 15:27:36
1752
原创 ajax 三级联动
1.构造html <div class="row cl"> <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>小区地址:</label> <div class="formControls col-xs-4 col-sm-4"> 省: <...
2022-03-04 19:30:58
282
原创 layui
推荐使用Layui镜像站:https://www.layui.siteLayer:https://www.layui.site/layer/index.htmMobile:https://www.layui.site/layer/mobile/index.htmLayui文档:https://www.layui.site/doc/index.htmLayui示例:https://www.layui.site/demo/index.htmLayer文档:https://www.layui.site/
2022-02-24 16:21:13
171
原创 小程序 首页弹性盒子 排列
1.页面 wxml<!-- 首页 弹性盒子 --><view class="menu"><navigator url="" class="menu-item"> <image src="/pages/image/banner/1.jpg" mode="widthFix" class="menu-img"></image><text class="menu-name">雷明璞</text></na...
2022-01-11 11:27:38
321
原创 微信小程序 轮播图
1.页面index.wxml代码<!--index.wxml--> <!--轮播图--><view class="container"> <swiper class="home-swiper" indicator-dots="true" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}"> <block wx:for-items="{{lun
2022-01-11 09:40:16
274
原创 tp6 防止XSS攻击
1.安装包包composer require ezyang/htmlpurifier2.封装公共方法:remove_xss方法if (!function_exists('remove_xss')) { function remove_xss($string) { //composer安装的,不需要此步骤。相对index.php入口文件,引入HTMLPurifier.auto.php核心文件 // require_once './plugin
2021-12-29 16:19:09
263
原创 tp6 短信宝 腾讯云 阿里云 短信发送
第一步:composer 安装composer require mrwanghongda/sms-sdk第二步:封装类<?phpnamespace 自拟use 找到SmsFactory类class Code { /** * 封装的手机号验证码 调用的时候传递电话号码 * @param $tel */ public static function phoneCode($tel) { //随机验证码 .
2021-12-17 10:44:05
483
原创 thinkphp6 composer下载phpspreadsheet
composer下载phpspreadsheetcomposer require phpoffice/phpspreadsheet封装<?phpnamespace app\index\lib;use PhpOffice\PhpSpreadsheet\Cell\Coordinate;use PhpOffice\PhpSpreadsheet\IOFactory;use PhpOffice\PhpSpreadsheet\Spreadsheet;use think\excepti
2021-12-02 08:53:48
698
原创 tp 6 JWT
1.引入php-jwt包composer require firebase/php-jwt2.代码<?phpnamespace app\api\controller;use Firebase\JWT\ExpiredException;use Firebase\JWT\JWT as JWTUtil;use think\Exception;class Jwt{ /** * 根据json web token设置的规则生成token * @re..
2021-11-28 20:10:57
495
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人