qq_45122261
码龄6年
关注
提问 私信
  • 博客:22,830
    22,830
    总访问量
  • 31
    原创
  • 1,287,326
    排名
  • 1
    粉丝
  • 0
    铁粉
IP属地以运营商信息为准,境内显示到省(区、市),境外显示到国家(地区)
IP 属地:河南省
  • 加入CSDN时间: 2019-05-24
博客简介:

qq_45122261的博客

查看详细资料
个人成就
  • 获得3次点赞
  • 内容获得3次评论
  • 获得13次收藏
  • 代码片获得154次分享
创作历程
  • 36篇
    2021年
成就勋章
兴趣领域 设置
  • 大数据
    mysqlredis
  • 服务器
    linux
  • 最近
  • 文章
  • 代码仓
  • 资源
  • 问答
  • 帖子
  • 视频
  • 课程
  • 关注/订阅/互动
  • 收藏
搜TA的内容
搜索 取消

fastadmin 修改 selectpage 参数

查看原文data-source$("#c-freight_id_text").data("selectPageObject").option.data = "user/user/index";data-params$('#c-freight_id_text').data("selectPageObject").option.params = function () { return {custom:{shop_id : shop_id}};};
原创
发布博客 2021.01.28 ·
992 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

PHP运算函数

查看原文加法<?php$a = '1.234';$b = '5';echo bcadd($a, $b); // 6echo bcadd($b, $a); // 6echo bcadd($a, $b, 4); // 6.2340?>减法<?php$a = '1.234';$b = '5';echo bcsub($a, $b); // -3echo bcsub($a, $b, 4); // -3.7660echo bcsub
原创
发布博客 2021.01.23 ·
238 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

tp5.0 queue

查看原文安装composer require topthink/think-queue:~V2.0配置 \application\extra\queue.php<?phpreturn [ 'connector' => 'Redis', // Redis 驱动 'expire' => 60, // 任务的过期时间,默认为60秒; 若要禁用,则设置为 null 'default' =>
原创
发布博客 2021.01.22 ·
234 阅读 ·
0 点赞 ·
0 评论 ·
1 收藏

js WebSocket操作

查看原文<script> var ws = new WebSocket("ws://127.0.0.1:8282"); //连接触发 ws.onopen = function(evt) { ws.send("发送的数据"); }; //收到消息触发 ws.onmessage = function(evt) { console.log( "Received Message: " + evt.data);
原创
发布博客 2021.01.22 ·
290 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

tp5分页保留搜索参数

查看原文<?phpDb::name('blog')->paginate(5,false,['query'=>$this->request->param()]);Db::name('blog')->paginate(5,false,['query'=>['参数名1' => '值1','参数名2' => '值2']);?>
原创
发布博客 2021.01.22 ·
170 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

js 返回上一页

查看原文js中使用window.history.go(-1); //返回上一页不刷新window.history.go(-2); //返回上两页不刷新window.history.back(); //返回上一页不刷新window.location.go(-1); //返回上一页刷新window.location.go(-2); //返回上两页刷新Html中使用<a href="javascript:history.go(-1);">向上一页</a>
原创
发布博客 2021.01.22 ·
76 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

tp5在PHP7.4下报错Array and string offset access syntax with curly braces is deprecated

查看原文进入thinkphp\library\think\db\Query.php getPartitionTableName 方法$seq = (ord($value{0}) % $rule['num']) + 1;//修改为$seq = (ord($value[0]) % $rule['num']) + 1;PHP7.4不在支持{0}写法
原创
发布博客 2021.01.22 ·
1247 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

PHP判断 函数/类/方法/属性 是否存在

查看原文函数是否存在<?phpfunction test(){ echo 'hello world';}var_dump(function_exists('test')); //truevar_dump(function_exists('test1')); //false?>类是否存在<?phpclass test{}var_dump(class_exists('test')); //truevar_dump(class_exists('
原创
发布博客 2021.01.22 ·
314 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Linux 安装 netcat

查看原文下载http://sourceforge.net/projects/netcat/files/netcat/0.7.1选择 netcat-0.7.1.tar.gz 下载解压将 netcat-0.7.1.tar.gz 解压到 /usr/local 目录下tar -zxvf netcat-0.7.1.tar.gz -C /usr/local重命名cd /usr/localmv netcat-0.7.1 netcat配置cd /usr/local/netcat./conf
转载
发布博客 2021.01.22 ·
879 阅读 ·
0 点赞 ·
0 评论 ·
6 收藏

GatewayClient 配合GatewayWorker 主动推送消息

查看原文<?phpnamespace appindexcontroller;use thinkController;use appindexlibraryGateway;class Chat extends Base{ public function __construct(){ parent::__construct(); //此处的注册地址要和GatewayWorker中start_register.php的注册地址一致 Gateway.
原创
发布博客 2021.01.22 ·
812 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Mysql 根据字段值长度搜索

查看原文SELECT * FROM `fa_code` where length(code) < 8
原创
发布博客 2021.01.21 ·
882 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

php 数组根据值排序 array_multisort

查看原文一维数组数字降序<?php$array = [1,2,3];array_multisort($array,SORT_DESC,SORT_NUMERIC);print_r($array);Array( [0] => 3 [1] => 2 [2] => 1)?>一维数组数字升序<?php$array = [3,2,1];array_multisort($array,SORT_ASC,SORT_NUMERIC);p
原创
发布博客 2021.01.21 ·
417 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

tp5.0 自定义命令

查看原文进入 application\command.php 添加执行方法命名空间<?phpreturn [ 'app\command\controller\WorkmanTask'];?>创建文件<?phpnamespace app\command\controller;use think\console\input\Option;use think\console\command;use think\console\Input;use t
原创
发布博客 2021.01.21 ·
154 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Composer 镜像

查看原文阿里composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/腾讯composer config -g repo.packagist composer https://mirrors.cloud.tencent.com/composer/华为composer config -g repo.packagist composer https://mirrors.huaweicloud.co
原创
发布博客 2021.01.21 ·
92 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

php qr-code

查看原文安装composer require endroid/qr-code使用<?phpnamespace app\index\controller;use Endroid\QrCode\QrCode;use think\Controller;class Index extend Controller{ public function test(){ $content = '二维码内容'; $qrCode = new QrCo
原创
发布博客 2021.01.21 ·
216 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

用Redis Desktop Manager连接Redis

查看原文1.下载 Redis Desktop Manager2.注释redis.conf文件中的:bind 127.0.0.1(或者绑定的其他ip)3.Windows测试端口是否畅通tenlnet 你的ip redis端口此时会有两种情况:1.你返回的结果是一片纯黑的cmd,那么恭喜你,你可以直接跳过这个步骤。2.你返回的是telnet不是内部或外部命令,查看解决方法 telnet不是内部或外部命令最后连接redis...
原创
发布博客 2021.01.21 ·
192 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

windows10 telnet不是内部或外部命令

查看原文控制面板->程序和功能->启用或关闭Window功能->选中Telnet客户端或Tenlnet Client
原创
发布博客 2021.01.21 ·
250 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

php 单例模式

查看原文单例一般来说,单例模式常用在数据库链接时使用,当第一次调用数据库链接时,我们使用单例将类保存,那么下次调用就不再需要new数据库类了,节省了new类的资源,注意:单例模式必须实现三私一公<?phpclass Single{ private static $instance; public $str; //防止直接创建对象 private function __construct(){ } //防止克隆对象 private
原创
发布博客 2021.01.21 ·
82 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

mysql LOCATE函数

查看原文locate(string,str,pos)select * from test where locate('test',str,1);string在str出现的位置从pos开始 类似php中strpos函数
原创
发布博客 2021.01.21 ·
553 阅读 ·
0 点赞 ·
0 评论 ·
1 收藏

mysql FIND_IN_SET函数

category_ids如下搜素category_ids包含16的数据select * from table where FIND_IN_SET('16',category_ids)改函数只能搜索逗号分隔的数据
原创
发布博客 2021.01.20 ·
87 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏
加载更多