2022年9月8日

jQuery-miniTip基本使用方法

摘要: <link href="https://cdn.bootcdn.net/ajax/libs/miniTip/1.5.3/miniTip.min.css" rel="stylesheet"> <script src="https://cdn.bootcdn.net/ajax/libs/miniTip/ 阅读全文

posted @ 2022-09-08 17:26 小馬過河﹎ 阅读(43) 评论(0) 推荐(0)

动态datalist使用方法一例

摘要: <input name="person_school" value="{$row[person_school]}" list="school_list" placeholder="请填写您的学校名称" /> <datalist id="school_list"></datalist> <script 阅读全文

posted @ 2022-09-08 17:22 小馬過河﹎ 阅读(41) 评论(0) 推荐(0)

jQuery复制到剪贴板clipboard.js简单用法

摘要: 复制到剪贴板 <!-- 引入js文件 --> <script src="https://cdn.bootcdn.net/ajax/libs/clipboard.js/2.0.8/clipboard.min.js"></script> <!-- 给dom添加class/data-clipboard-t 阅读全文

posted @ 2022-09-08 17:21 小馬過河﹎ 阅读(387) 评论(0) 推荐(0)

ThinkPHP3加固I()函数过滤单引号

摘要: function.php function htmlentities_custom($str) { return htmlentities($str, ENT_QUOTES); } config.php return [ 'DEFAULT_FILTER' => 'htmlentities_custo 阅读全文

posted @ 2022-09-08 17:19 小馬過河﹎ 阅读(87) 评论(0) 推荐(0)

vue-hisory项目在nginx下的伪静态配置

摘要: location / { try_files $uri $uri/ /index.html last; index index.html; } add_header 'Access-Control-Allow-Origin' '*' always; #允许来自所有的访问地址 add_header ' 阅读全文

posted @ 2022-09-08 17:16 小馬過河﹎ 阅读(999) 评论(0) 推荐(0)

ThinkPHP3.2.5 GIF.class.php for php7.4

摘要: PHP7.4不再支持使用大括号访问数组以及字符串的偏移 PHP7.4不再支持数组{}写法,统一为数组[] 路径:/ThinkPHP/Library/Think/Image/Driver/GIF.class.php <?php // + // | TOPThink [ WE CAN DO IT JUS 阅读全文

posted @ 2022-09-08 17:14 小馬過河﹎ 阅读(81) 评论(0) 推荐(0)

vue使用layui上传

摘要: 问题在于vue渲染多个虚拟dom无法触发layui.upload.render()方法,解决方案为:点击上传按钮的容器时删除dom并重新渲染。 核心代码 <div class="layui-form-item"> <div class="layui-form-label">图片附件</div> <d 阅读全文

posted @ 2022-09-08 17:12 小馬過河﹎ 阅读(276) 评论(0) 推荐(0)

使用Array.reduce对数组去重

摘要: JavaScript uniqArray = arr => arr.reduce((acc, val) => { acc.indexOf(val) == -1 && acc.push(val) return acc }, []) Examples uniqArray([1, 2, 2, 3]) // 阅读全文

posted @ 2022-09-08 17:11 小馬過河﹎ 阅读(28) 评论(0) 推荐(0)

php通过文件路径获取文件名/文件标题/文件后缀名/文件大小

摘要: ### 通过路径获取文件名 ```php function getFileName($filePath) { return \mb_substr($filePath, \mb_strrpos($filePath, '/') + 1); } // V2 function getFileName($fi 阅读全文

posted @ 2022-09-08 17:06 小馬過河﹎ 阅读(379) 评论(0) 推荐(0)

字体文件转base64

摘要: 链接 https://transfonter.org/ 配置 阅读全文

posted @ 2022-09-08 17:04 小馬過河﹎ 阅读(60) 评论(0) 推荐(0)

ThinkPHP3图片水印文字居中

该文被密码保护。 阅读全文

posted @ 2022-09-08 17:01 小馬過河﹎ 阅读(0) 评论(0) 推荐(0)

PHP导出Excel类 Excel.class.php

摘要: <?php namespace Common\Cls; /** * 生成excel文件操作 * * @author wesley wu * @date 2013.12.9 */ class Excel { private $limit = 10000; public function downloa 阅读全文

posted @ 2022-09-08 17:00 小馬過河﹎ 阅读(56) 评论(0) 推荐(0)

SmsController.class.php

该文被密码保护。 阅读全文

posted @ 2022-09-08 14:37 小馬過河﹎ 阅读(0) 评论(0) 推荐(0)

ThinkPHP引入阿里云aliyun-openapi-php-sdk

该文被密码保护。 阅读全文

posted @ 2022-09-08 14:35 小馬過河﹎ 阅读(0) 评论(0) 推荐(0)

PHP配置文件修改session过期时间

摘要: # 利用 cookie 来传递 sessionid session.use_cookies = 1 # SessionID 在客户端 Cookie 储存的时间(秒) / 86400=1天 session.cookie_lifetime = 86400 # Session 数据在服务器端储存的时间(秒 阅读全文

posted @ 2022-09-08 14:33 小馬過河﹎ 阅读(52) 评论(0) 推荐(0)

天地图坐标系转高德坐标系 WGS84转GCJ02

摘要: let [lng, lat] = [116.391358342, 39.9049662090001] console.log([lng, lat].toString()) console.log(wgs84Togcj02(lng, lat).toString()) function wgs84Tog 阅读全文

posted @ 2022-09-08 14:31 小馬過河﹎ 阅读(1930) 评论(0) 推荐(0)

css 渐变文字

摘要: 源码 .container{ width:100vw; height:100vh; display:flex; justify-content:center; align-items:center; } .container .content{ font-size:40px; background: 阅读全文

posted @ 2022-09-08 14:30 小馬過河﹎ 阅读(11) 评论(0) 推荐(0)

thinkphp3.2.5路由配置无法跳转到外部链接的问题

摘要: 官方文档 解决方法 按照文档的说明发现行不通,看了下Route.class.php 修改了第95行附近代码: 阅读全文

posted @ 2022-09-08 14:27 小馬過河﹎ 阅读(33) 评论(0) 推荐(0)

PHP二维码解码QrReader类|二维码图片转字符串

摘要: composer qrcode-detector-decoder composer require khanamiryan/qrcode-detector-decoder 1.0.3 ThinkPHP index.php引入composer require './vendor/autoload.ph 阅读全文

posted @ 2022-09-08 14:25 小馬過河﹎ 阅读(403) 评论(0) 推荐(0)

mysql order by 使用汉字字段排序

摘要: order by convert(`field` using 'GBK') 阅读全文

posted @ 2022-09-08 11:41 小馬過河﹎ 阅读(48) 评论(0) 推荐(0)

JSON.parse出现\n时解析错误

摘要: ```javascript , data: { list: `{$row["bs_json"]}` ? JSON.parse(`{$row['bs_json']}`.replace(/\n/g, "\\n")) : JSON.parse(`[{"title":"","content":""}]`) 阅读全文

posted @ 2022-09-08 11:40 小馬過河﹎ 阅读(36) 评论(0) 推荐(0)

layui表格自动换行相关css和js

摘要: <style> .layui-table-cell { height: auto; overflow: visible; text-overflow: inherit; white-space: normal; word-break: break-all; } .layui-table-cell a 阅读全文

posted @ 2022-09-08 11:39 小馬過河﹎ 阅读(432) 评论(0) 推荐(0)

mysql 自定义函数 身份证号转年龄(支持15/18位身份证)

摘要: 函数 FUNCTION `idcard2age`(`idcard` varchar(255)) RETURNS int(10) BEGIN if idcard regexp '[0-9]{18}|[0-9]{17}X|[0-9]{15}' then if(length(idcard)=18)then 阅读全文

posted @ 2022-09-08 11:38 小馬過河﹎ 阅读(63) 评论(0) 推荐(0)

javascript随机整数

摘要: zoom范围[x,y] 对应关系:Math.floor(Math.random() * [y-x]) + x; 例如:zoom范围[11,18] Math.floor(Math.random() * 7) + 11 阅读全文

posted @ 2022-09-08 11:35 小馬過河﹎ 阅读(19) 评论(0) 推荐(0)

jQuery ajax 使用同步模式(禁用异步模式)

摘要: $.ajaxSettings.async = false $.getJSON('__MODULE__/Echart/l_hjcate_cun', { cun_id: '{:I("cun_id")}' }, function (res) { res.forEach(i => { option.xAxi 阅读全文

posted @ 2022-09-08 11:16 小馬過河﹎ 阅读(104) 评论(0) 推荐(0)

layui主动触发表单控件事件select|checkbox|radio

摘要: ### 以radio为例,监听事件的代码为: ```javascript form.on('radio(filter)', function (data) { // dosomething }) ``` ### 主动触发事件: ```javascript $('#radioID').next().t 阅读全文

posted @ 2022-09-08 11:15 小馬過河﹎ 阅读(779) 评论(0) 推荐(0)

jquery.table.rowspan 自动合并单元格rowspan插件使用方法

摘要: jquery.table.rowspan.js源码 (function ($) { $.fn.extend({ //表格合并单元格,colIdx要合并的列序号,从0开始 "rowspan": function (colIdx) { return this.each(function () { var 阅读全文

posted @ 2022-09-08 11:12 小馬過河﹎ 阅读(513) 评论(0) 推荐(0)

ThinkPHP3上传文件使用保存为原文件名并且支持覆盖

摘要: $upload->saveName = []; $upload->replace = true; 阅读全文

posted @ 2022-09-08 11:02 小馬過河﹎ 阅读(37) 评论(0) 推荐(0)

ThinkPHP统计字段+1或者-1

摘要: $User = M("User"); // 实例化User对象 $User->where('id=5')->setInc('score', 3); // 用户的积分加3 $User->where('id=5')->setInc('score'); // 用户的积分加1 $User->where('i 阅读全文

posted @ 2022-09-08 10:40 小馬過河﹎ 阅读(157) 评论(0) 推荐(0)

uni-app picker-view 简单使用一例

摘要: 文档链接 https://uniapp.dcloud.io/component/picker-view.html 源码 <template> <view class="u-p-30"> <u-divider>{{edus[current].label}}</u-divider> <picker-vi 阅读全文

posted @ 2022-09-08 10:37 小馬過河﹎ 阅读(1137) 评论(0) 推荐(0)

uniapp picker-view picker-view-column 选择日期一例

摘要: 文档链接 https://uniapp.dcloud.io/component/picker-view.html 源码 <template> <view class="u-p-30"> <u-divider>{{year}}年{{month}}月{{day}}日</u-divider> <picke 阅读全文

posted @ 2022-09-08 10:35 小馬過河﹎ 阅读(533) 评论(0) 推荐(0)

cxselect的简单使用/ajax无限联动

摘要: jQuery cxSelect 1.4.2 源码 /*! * jQuery cxSelect * @name jquery.cxselect.js * @version 1.4.2 * @date 2017-09-26 * @author ciaoca * @email ciaoca@gmail.c 阅读全文

posted @ 2022-09-08 10:30 小馬過河﹎ 阅读(286) 评论(0) 推荐(0)

网页整体变成灰色

摘要: <head> <style> html { -webkit-filter: grayscale(100%); -moz-filter: grayscale(100%); -ms-filter: grayscale(100%); -o-filter: grayscale(100%); filter:p 阅读全文

posted @ 2022-09-08 10:11 小馬過河﹎ 阅读(166) 评论(0) 推荐(0)

ThinkPHP上传图片压缩尺寸

摘要: function layuiUpload($path = '') { $upload = new \Think\Upload(); $upload->maxSize = 2097152; $upload->exts = ['jpg', 'jpeg', 'png', 'gif', 'doc', 'do 阅读全文

posted @ 2022-09-08 10:10 小馬過河﹎ 阅读(63) 评论(0) 推荐(0)

linux删除session文件

摘要: #!/bin/sh find /var/lib/php5 -type f -mtime +2 -exec rm -f {} \; -type f是指定文件类型为普通文件。 -mtime +2是指修改时间距离现在2天的文件。 -2是指修改时间距离现在不足2天的文件 -exec rm -f指执行删除匹配 阅读全文

posted @ 2022-09-08 10:08 小馬過河﹎ 阅读(107) 评论(0) 推荐(0)

php过滤回车/换行符

摘要: 不推荐 str_replace(PHP_EOL, '', $str); 推荐 preg_replace("/[\r\n]+/", '', $str); trim()函数也可以过滤所有两边的空格和特殊字符 \trim($str); 阅读全文

posted @ 2022-09-08 10:05 小馬過河﹎ 阅读(92) 评论(0) 推荐(0)

记一次curl无返回值的调试

摘要: 问题 php curl 执行post发现无返回值 调试 直接输出后发现是乱码 curl_setopt($ch, CURLOPT_RETURNTRANSFER, false); 解决 核心代码 $output = mb_convert_encoding($output, 'UTF-8', 'UTF-8 阅读全文

posted @ 2022-09-08 09:52 小馬過河﹎ 阅读(940) 评论(0) 推荐(0)

CentOS 扩容系统盘&挂载数据盘

摘要: 系统盘扩容 yum install -y cloud-utils-growpart growpart /dev/vda 1 xfs_growfs / 宝塔面板挂载数据盘 yum install wget -y && wget -O auto_disk.sh http://download.bt.cn 阅读全文

posted @ 2022-09-08 09:47 小馬過河﹎ 阅读(24) 评论(0) 推荐(0)

导航