- 博客(51)
- 资源 (3)
- 收藏
- 关注
原创 python aes-ecb-128加解密 RSA sha256签名
【代码】python aes-ecb-128加解密 RSA sha256签名。
2022-09-08 17:30:24
767
原创 laravel-admin Maatwebsite\excel 通过自定义数据导出
文档:Exporting collections | Laravel Excel导出类class TestExport implements FromArray { protected $invoices; protected $columns = ['姓名','性别']; public function __construct(array $invoices) { $this->invoices = array_merge([$th
2022-05-23 10:30:30
360
原创 laravel-admin使用iframe-tabs打开多页面
iframe-tabs: laravel-admin使用iframe-tab打开多页面
2022-05-18 16:10:00
773
原创 postman pre-request script脚本
let salt = "";keys = Object.keys(request.data).sort() //请求参数名按照ASCII码升序排序//拼接待签名字符串var str = []for (var p = 0; p < keys.length; p++) {if(keys[p] == "sign" || request.data[keys[p]] === ""){continue;}str.push(keys[p] + "=" + request.data[k
2022-05-09 15:06:12
821
原创 aes 128 cbc packpadding5加密
$iv = '0010010000100100';$openssl = openssl_encrypt($encrypt, 'AES-128-CBC', $password, 0, $iv);$openssl = openssl_encrypt($encrypt, 'AES-128-CBC', $password, OPENSSL_RAW_DATA, $iv);$ret = base64_encode($openssl);
2022-04-22 10:50:25
138
原创 laravel 按日期分组查询
laravel 按日期分组查询//按日分组查询 $time_list = Order::query()->from('order as ao') ->where($where) ->select(['ao.orderid', 'ao.create_time', \DB::raw('FROM_UNIXTIME(te_ao.create_time,"%Y
2021-09-22 16:59:50
872
原创 php rsa签名公钥加密私钥解密 aes加解密 函数
//私钥签名public function getSign($content, $privateKey){ $privateKey = "-----BEGIN RSA PRIVATE KEY-----\n" . wordwrap($privateKey, 64, "\n", true) . "\n-----END RSA PRIVATE KEY-----"; $key = openssl_get_privatekey($.
2021-09-17 15:01:10
369
原创 securecrt端口转发socks4/5 代理服务器
1、连接服务器2、options>会话选项>端口转发>添加 填写本地端口号 勾选使用socks进行动态转发3、options>全局选项>防火墙>添加>选择socks类型>填写上面设置的端口4、使用代理,internet选项>连接>局域网设置>高级>套接字 填写上面设置的端口...
2021-07-14 15:30:44
1130
原创 laravel 重复注册 锁 lockForUpdate
DB::beginTransaction();User::query()->where(['id' => 1])->lockForUpdate()->first();//加锁业务逻辑......DB::commit();
2021-05-17 15:25:18
325
原创 laravel_admin 单一登录的简单实现
一、修改vendor/encore/laravel-admin/src/Controllers/AuthController.php中postLogin方法if ($this->guard()->attempt($credentials, $remember)) { $res = $this->sendLoginResponse($request); //登录成功 记录token $th
2021-04-09 16:00:43
1012
3
原创 laravel_admin后台管理,限制登录错误次数
修改文件vendor/encore/laravel-admin/src/Controllers/AuthController.php1、引入ThrottlesLoginsuse Illuminate\Foundation\Auth\ThrottlesLogins;class AuthController extends Controller{ /** * @var string */ protected $loginView = 'admin::log
2021-04-09 15:53:54
690
原创 FIND_IN_SET laravel 使用
GoodsGroupParam::query()->from('goods_group_param as goods_group_param') ->leftJoin('group_param as gp',function ($join) { $join->whereRaw(\DB::raw('FIND_IN_SET(te_gp.id,te_goods_group_param.param_ids)')); ..
2021-03-29 15:32:12
2296
原创 laravel_admin 列表筛选 联动load 默认选中
修改文件:vendor/encore/laravel-admin/src/Grid/Filter/Presenter/Select.php/** * Load options for other select when change. * * @param string $target * @param string $resourceUrl * @param string $idField * @param string $textFiel
2021-03-27 15:56:09
838
原创 laravel_admin 列表筛选表单框不显示历史记录
修改文件 vendor/encore/laravel-admin/resources/views/filter/container.blade.phpform表单增加:<form autocomplete="off"
2021-03-25 17:15:18
208
原创 laravel_admin 列表 分组统计 总计 查询 groupBy totalRow
protected function grid() { $grid = new Grid(new OrderGoods());$sql = 'SELECT `te_a`.*, sum( te_a.num ) AS a_num, sum( te_a.total_amount ) AS a_total_amount, sum( te_a.cost_total_amount ) AS a_cost_total_amount FROM `te_order_goo.
2021-03-24 11:03:40
2252
3
原创 laravel workerman多进程定时任务 记录
一、安装workermancomposer require workerman/workerman二、编写artisan控制台命令php artisan make:command WorkermanTimerCommand在 laravel 的 app\Console\Commands 目录下生产了一个 WorkermanTimerCommand.php 文件三、编写workerman控制台命令<?phpnamespace App\Console\Commands;
2021-02-22 15:03:24
1090
1
原创 php set_time_limit 无效 阿里云配置cdn后504超时
请求总是超过30秒就超时了,修改服务器配置也不行最终修改阿里云cdn回源配置超时时间解决
2021-01-22 17:28:57
252
1
原创 本地调试如何连接设有白名单的数据库,绕过白名单,securecrt 端口转发
在家办公如,在不设置白名单的情况下如何本地调试时连接阿里云设有白名单的数据库服务器A 可访问数据库B本地不可直接访问数据库B使用允许访问数据库的服务器A做中继使用secureCRT做端口映射1、下载secureCRT软件2、打开软件,编辑默认会话端口转发》添加3、然后连接上服务器如果修改或添加了转发一定要重新连接一下服务器4、使用'driver' => 'mysql','host' => '127.0.0',//转发规则..
2021-01-09 17:02:36
879
1
原创 laraven-admin 弹出表格
实现效果,单击操作日志,弹出列表定义批处理OprateLog文件内容:<?phpnamespace App\Admin\Actions\Post\User;use Encore\Admin\Actions\BatchAction;use Illuminate\Database\Eloquent\Collection;use Illuminate\Http\Request;class OprateLog extends BatchAction{ .
2020-12-25 18:18:35
1059
原创 ip经常变动如何连接阿里云rds设有白名单的数据库,navicat使用ssh连接数据库
使用nvaicat最新版,ssh填写能连接数据库的服务器信息navicat15激活参考轻岚:https://blog.csdn.net/qq_41572507/article/details/89601168轻岚:navicat最新版激活方法轻岚:https://www.cnblogs.com/hfxtest/archive/2020/03/17/12513210.html...
2020-12-15 15:14:26
935
原创 study1-rsa 根据pubkey.pem提取p q 根据pqe生成私钥 解密获取f
工具:opensslrsatool.py(可在https://github.com/adeptex/rsatool或者https://github.com/ius/rsatool(免安装)上下载)1、openssl解析pubkey.pem得到nModulus=C2636AE5C3D8E43FFB97AB09028F1AAC6C0BF6CD3D70EBCA281BFFE97FBE30DDopenssl rsa -pubin -text -modulus -in warmup -in pubkey.
2020-11-06 12:44:11
1649
原创 rsa算法简单例子
1.选择一对素数 p 和 q2.n = p * q3.f(n) = (p -1) * (q - 1)4.找一个与f(n)互质的数加密秘钥e,且1<e<f(n)5.计算解密秘钥d,d * e≡ 1 mod f(n),≡为互余符号,符号左边必须和符号右边同余,也就是两边模运算结果相同,即(d * e) mod f(n) = 1 mod f(n) = 1,(d * e) mod f(n) = 1, d*e = k*(f(n) + 16.公钥(e, n),私钥(d, n)7...
2020-11-05 11:40:48
9589
2
原创 php unipush个推推送
文档:http://docs.getui.com/getui/server/php/start/后台:https://dev.dcloud.net.cn/uni/pushfunction push_message($uid,$device,$title,$message,$app_type=1){ vendor('unipush.UniPush');// pul_vendor(); $config = [ 'APPKEY'
2020-11-04 14:32:43
1902
原创 PHP sha256WithRsa加解密
//生成 sha256WithRSA 签名 public function getSign($content, $privateKey){ $privateKey = "-----BEGIN RSA PRIVATE KEY-----\n" . wordwrap($privateKey, 64, "\n", true) . "\n-----END RSA PRIVATE KEY-----"; $key = openss.
2020-11-02 15:10:11
5221
2
原创 mysql update子查询条件更新 联表条件查询更新
UPDATE member mINNER JOIN trade t ON m.uid = t.uidAND t.date_y = '.$y.'AND t.date_m = '.$m.'LEFT JOIN ( SELECT count(*) AS c_num, puid FROM member WHERE group_id >= 5 GROUP BY puid) manum ON manum.puid = m.uidSET m.group_id = 6WHER.
2020-10-28 17:57:25
1862
原创 centos php7 mcrypt安装
```下载libmcryptwgethttp://nchc.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gztar zxvf libmcrypt-2.5.8.tar.gzcd libmcrypt-2.5.8./configuremake && make install下载mcryptwget http://pecl.php.net/get/mcrypt-1.0.1.t.
2020-09-29 18:19:26
236
原创 easywechat
<?phpnamespace App\Http\Classes;use EasyWeChat\Factory;class Wechat{ /** * @var \EasyWeChat\OfficialAccount\Application */ public $app; /** * @var \Overtrue\Socialite\Providers\WeChatProvider */ public $oaut.
2020-08-09 14:37:26
606
原创 无限级上级查询sql
SELECT a._id AS id, a.lvl,FROM ( SELECT @r AS _id, ( SELECT @r := pid FROM users WHERE uid = _id ) AS pid ,@l := @l + 1 AS lvl FROM (SELECT @r :=1111, @l := 0) vars, users h WHERE @r <> 0 ) aJ.
2020-08-09 14:23:10
260
原创 淘宝客api接入步骤详解
淘宝联盟开放平台:https://open.alimama.com/#!/document一、创建应用淘宝联盟生态伙伴:https://www.alimama.com/member/login.htm?forward=http%3A%2F%2Fpub.alimama.com%2Fthird%2Fmanage%2Frecord%2Fstep.htm%3Fcategorie%3D0%26step%3D1推广管理>添加备案审核成功后点击appkey申请,跳转到阿里开放平台应用管理..
2020-06-22 16:21:57
14328
1
原创 excel读取时间转时间戳
strtotime(gmdate('Y-m-d H:i',intval(($excel_time_value - 25569) * 3600 * 24)))
2020-01-10 11:13:17
1398
原创 php 使用COM 将word转换为html
$com = new \COM("word.application", null, CP_UTF8) or die("Can't start Word!");$com->Visible = 0;$com->Documents->OPen(request()->domain()."$wordname");//$com->Documents[1]->Sav...
2020-01-09 16:13:22
372
原创 laravel 分组查询 获取最新一条数据 子查询
期望实现SELECT * FROM (SELECT a.* FROM app AS a LEFT JOIN su s ON a.user_id = s.user_id AND a.school_id = s.school_id WHERE a.user_id = 1 ORDER BY a.id desc ) AS c group by school_idlaravel 模型 查询$s...
2019-08-23 22:01:20
6424
转载 js实现浏览器全屏
html<div id="allScreen">全屏</div>js$("#allScreen").click(function(){ if(flag){ fullScreen(); }else{ exitFull(); } flag = !flag;});function fullScreen() { var el = docu...
2018-12-05 09:44:07
881
原创 layui复选框限制选择个数
复选框限制选择个数html<div class="layui-form-item"> <label class="layui-form-label">xxx</label> <div class="layui-input-block"> <input class="edu
2018-12-05 09:43:06
4230
1
转载 带参数二维码生成
<?phpnamespace app\api\controller;use app\admin\model\User;class CodeController extends BaseController{ /** * @api {post} /code/getMyCode 1.getMyCode获取我的邀请码 * @apiVersion 1.0...
2018-12-05 09:40:35
256
原创 phpexcel数据导入
phpexcel数据导入$keyNames = [ 'keyname1', 'keyname2', 'keyname3', 'keyname4',];$filename = "";//xlsx文件地址//获取数据$data = getFileData($filename,$keyNames);//存入数据库//.......//方法funct...
2018-12-05 09:35:26
387
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人