2022年9月9日

Validator表单验证1.05@我佛山人【经典】

摘要: <table align="center"> <form name="theForm" id="demo" method="get" onSubmit="return Validator.Validate(this,2)"> <tr> <td>身份证号:</td> <td><input name=" 阅读全文

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

CSS清除浮动三件套

摘要: 将样式定义在浮动元素们的父层 .parent::after{ content:""; display:block; clear:both; } 阅读全文

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

CSS单行文本溢出显示…三件套

摘要: p{ width:100px; height:20px; /*三件套*/ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } 阅读全文

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

CSS段落两端对齐 / 长文本自动换行

摘要: Examples 1 p{ text-align: justify; text-justify: inter-ideograph; } Examples 2 p{ word-wrap: break-word; word-break: normal; } 阅读全文

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

开启MYSQL慢查询

摘要: 在安装根目录下my.ini加入两行(5.5以上版本) slow_query_log = ON long_query_time = 1 重启MySQL >net stop mysql >net start mysql 查看配置 SHOW VARIABLES LIKE '%slow_query_log% 阅读全文

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

jQuery全选/全不选

摘要: HTML <input type="checkbox" id="checkAll">全选/全不选 <input type="checkbox" name="item[]" value="1">item1 <input type="checkbox" name="item[]" value="2">i 阅读全文

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

jQuery判断复选框是否被选中

摘要: DOM方式判断 var $cr=$('#cr') var cr=$cr[0] $cr.click(function(){ if(cr.checked){ alert('复选框被选中了') } }) jQuery方式判断 var $cr=$('#cr') $cr.click(function(){ i 阅读全文

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

jQuery导出HTML表格到Excel|jquery.table2excel.js的用法

摘要: Examples $(function(){ $('#btn').click(function(){ $('#tb').table2excel({ exclude:'.noExcl', //标记不导出行的CSS,用到td上会导致后面的td前移 name:'ExcelDocumentName', // 阅读全文

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

jquery-select多选

摘要: 文档 https://multiple-select.wenzhixin.net.cn/ Examples <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>MULTIPLE SELECT</title> <script src= 阅读全文

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

flex结合margin:auto定义包含项目居中显示

摘要: margin:auto;在伸缩盒中具有强大的功能,一个定义为“auto”的margin会合并剩余的空间,它可以用来把伸缩项目挤到其它位置。 Examples <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <style> body{ marg 阅读全文

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

背景图像完全覆盖元素区域

摘要: Examples <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>背景图像完全覆盖元素区域</title> <style> div{ margin:2px; float:left; border:1px solid red; b 阅读全文

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

javascript|jQuery清除input空格

摘要: Examples $(function(){ //表单去空格 $("input").bind('blur keyup',function(){ $(this).val($(this).val().replace(/\s*/g,'')) }) }) 阅读全文

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

PHP日期遍历/年月遍历

摘要: ### 日期遍历 ```php function date_range($date1,$date2){ $timestamp1=strtotime($date1); $timestamp2=strtotime($date2); $days=($timestamp2-$timestamp1)/8640 阅读全文

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

PHP转码函数iconv

摘要: iconv ( string in_charset, string out_charset, string str ) //忽略错误 $str=iconv('GBK','UTF-8//IGNORE',$str); 阅读全文

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

ThinkPHP $this->error 关闭页面

摘要: $this->closeWin=1; $this->error('用户名或密码错误'); 阅读全文

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

PHP截取指定两个字符之间字符串

摘要: function get_between($input,$start,$end){ return substr($input,strlen($start)+strpos($input,$start),(strlen($input)-strpos($input,$end))*(-1)); } 阅读全文

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

CSS下拉菜单

摘要: <ul class="nav"> <li><a href="/">首页</a></li> <li class="drop-down"> <a href="javascript:;">出售房源</a> <ul class="drop-down-content"> <li><a href="/Sell" 阅读全文

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

PHP ip2long() 出现负数的解决方法

摘要: function ip_long($ip=0){ return sprintf('%u',ip2long($ip)); } 阅读全文

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

javascript 把日期字符串替换成数字串

摘要: datetimeStr.replace(/ |:|-/g,'') 阅读全文

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

php将textarea内容根据换行转换数组

摘要: $arr=explode("\r\n",I('textarea')); 阅读全文

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

javascript|es6|计算字符串长度的方法

摘要: 这种方法的好处在于:可以正确处理各种Unicode字符,不会将大于\uFFFF的Unicode字符算作2个字符。 //第一种:使用扩展运算符 [...str].length //第二种:使用Array.form()方法 Array.from(str).length 阅读全文

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

生日转年龄

摘要: function birthday2age($birthday='1949-10-01'){ list($year,$month,$day)=explode('-',$birthday); $year_diff=date('Y')-$year; $month_diff=date('m')-$mont 阅读全文

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

以逗号分隔的字符串是否交集

摘要: delimiter $$ use `tzjob`$$ drop function if exists `is_mixed`$$ create definer=`root`@`localhost` function `is_mixed`(str1 text,str2 text) returns tin 阅读全文

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

php函数返回当前季度

摘要: function current_quarter(){ return ceil((date('n'))/3); } 阅读全文

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

ThinkPHP模板select年份

摘要: <select name="s_deduct_year"> <option value="">年度</option> <for start="2019" end="date('Y')" comparison="elt"> <option value="{$i}" <if condition="$i= 阅读全文

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

php 强制跳转到https

摘要: if(!isset($_SERVER['HTTPS'])||$_SERVER['HTTPS']=='off'){ header("HTTP/1.1 301 Moved Permanently"); header('Location:https://'.$_SERVER['HTTP_HOST'].$_ 阅读全文

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

去掉layui table tr hover 效果

摘要: .layui-table tbody tr:hover { background-color: white; } 阅读全文

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

ThinkPHP3图片加文字水印

摘要: (new \Think\Image) ->open('./cert/static/base.jpg') ->text($name.$phone,'./cert/static/font.ttf',22,'#111111',[123,312]) ->text($date,'./cert/static/f 阅读全文

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

mysql查询增加表头

摘要: select '微信支付流水号' as juan_orderno ,'捐赠人' ,'手机号码' ,'捐赠金额' ,'捐赠时间' ,'捐赠项目' ,'捐赠人备注' ) union all ( select juan_orderno ,juan_name ,juan_phone ,juan_price 阅读全文

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

IIS强制HTTPS&ThinkPHP隐藏index.html

摘要: <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <clear /> <rule name="ssl" stopProcessing="true"> <match u 阅读全文

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

IIS vue-history配置

摘要: <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="vue-history" patternSyntax="Wildcard"> <match 阅读全文

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

php 过滤数组的null值

摘要: function unset_null($arr){ foreach($arr as $k=>$v){ $arr[$k]=($v==null||is_null($v)||$v=='null')?'':$v; } return $arr; } 阅读全文

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

mysql 根据指定值排序

摘要: select * from `jumin` where jumin_house_id=$house_id order by (case when jumin_quanshu='自有' then 1 when jumin_quanzhu='租赁' then 2 else 99 end) ,(case 阅读全文

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

css 中文单行竖排

摘要: .vertical{ width: 20px; margin: 0 auto; line-height: 24px; } 阅读全文

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

mysql 使用函数验证身份证(简易)

摘要: CREATE DEFINER=`root`@`%` FUNCTION `check_jumin_idcard`(`idcard` varchar(50)) RETURNS tinyint(1) BEGIN if idcard regexp '[0-9]{18}|[0-9]{17}X|[0-9]{15 阅读全文

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

mysql 触发器修改密码

摘要: #admin_before_insert if (new.user_pass<>'' and new.user_pass is not null) then set new.user_pass=md5(new.user_pass); else set new.user_pass='' end if; 阅读全文

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

常用正则表达式

摘要: //手机号码 /^[1][1,2,3,4,5,7,8,9][0-9]{9}$/ //汉字 /^[\u0391-\uFFE5]+$/ 阅读全文

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

layer.alert|layer.msg图标

摘要: ![image](https://img2022.cnblogs.com/blog/316407/202209/316407-20220909105409547-1638618656.png) ![image](https://img2022.cnblogs.com/blog/316407/202209/316407-20220909105413749-446560884.png) ![image 阅读全文

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

div圆角头像

摘要: <div class="avator" style="background: url({:format_person_photo($vo[person_photo],$vo[person_sex])});" ></div> .avator { width: 60px; height: 60px; b 阅读全文

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

layui layedit

摘要: <textarea id="edit" name="article_content" style="display: none;" >{$row[article_content]}</textarea> layui.use(['layedit'], function () { var 'form', 阅读全文

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

php本月第一天/本月最后一天

摘要: 本月第一天 $month_first_day=date('Y-m-01',strtotime(date("Y-m-d"))); 本月第二天 $month_last_day=date('Y-m-d',strtotime("$month_first_day +1 month -1 day")); 202 阅读全文

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

uniapp/微信小程序 获取手机号码

摘要: <button type="primary" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" >获取本机号码</button> getPhoneNumber(e) { this.$request({ url: 'user/get 阅读全文

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

uniapp 获取视窗高度

摘要: , onReady: function() { uni.getSystemInfo({ success: function(res) { pageHeight = res.windowHeight console.log('pageHeight',pageHeight) } }) setTimeou 阅读全文

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

css 分隔竖线

摘要: .fly-mid { display: inline-block; height: 10px; width: 1px; margin: 0 10px; vertical-align: middle; background-color: #e2e2e2; } 阅读全文

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

设置不打印区域

摘要: @media Print { .noprint { DISPLAY: none } } 阅读全文

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

thinkphp3 count `*` 的问题

摘要: // /ThinkPHP/Library/Think/Model.class.php // 统计查询的实现 // $field = isset($args[0]) ? $args[0] : '*'; // return $this->getField(strtoupper($method) . '( 阅读全文

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

nginx 正则 rewrite 301

摘要: if ($request_uri ~* "^/detail.asp\?id=(\d+)$") { set $id $1; rewrite .* https://$host/detail/$id? permanent; } # 一定有参数 rewrite ^/news/view.asp /news/i 阅读全文

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

layui 数据表格 单元格展开时的内容自动换行

摘要: .layui-table-tips-main { white-space: pre-wrap; } 阅读全文

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

js禁用右键/选中/键盘

摘要: 禁用右键、select document.body.onselectstart = document.body.oncontextmenu = function () { return false } 禁用键盘 $(document).off().on("keydown", function (e) 阅读全文

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

mysql 判断时间间隔

摘要: Examples timestampdiff(minute,smscode_addtime,now())<=3 阅读全文

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

MYSQL使用rand()函数生成一定范围的随机数

摘要: 生成≥a且≤b的随机数 x=a y=(b-a)+1 select floor(x+rand()*y); 例如生成≥2且≤10的随机数 select floor(2+rand()*9); 阅读全文

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

将$emit写在template代码中

摘要: <input type="search" @keyup.enter="$emit('search',$event.target.value)" /> 阅读全文

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

vue computed v-model 结合使用

摘要: data() { return { vcodeBtnName: "获取验证码", countNum: 120, countDownTimer: null, ent: {} } }, computed: { mobile: { get() { console.log('我被调用了') return t 阅读全文

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

H5新标签datalist实现可以输入的select

摘要: HTML <input name="s_key" list="s_key_list"/> <datalist id="s_key_list"> <option value="Internet Explorer"> <option value="Firefox"> <option value="Chr 阅读全文

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

fixed

摘要: CSS .mobile{ position:fixed; bottom:20px; right:20px; width:50px; height:50px; background-size:cover; z-index:999; background:darkblue; border-radius: 阅读全文

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

查看某个端口是否开启

摘要: netstat -ano -p tcp | find "3389" >nul 2>nul && echo 3389端口开启!|| echo 3 389未开启! 阅读全文

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

windows服务器配置允许远程连接mysql

摘要: 关闭防火墙 修改my.ini中的[mysqld] [mysqld] #bind_address=0.0.0.0 skip-name-resolve 建立用户时主机设为:% 阅读全文

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

word 正则表达式替换字符串

摘要: 正则表达式要放在()中,替换中的\1代表被替换的第一个表达式,即第一个()中匹配到内容。 阅读全文

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

浏览器大尺寸截屏

摘要: 安装python 别忘记设置系统环境变量 https://www.python.org/ 安装selenium python -m pip install -U selenium 下载geckodriver 放在python目录下 https://github.com/mozilla/geckodr 阅读全文

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

vue v-cloak

摘要: 这个指令保持在元素上直到关联实例结束编译。和 CSS 规则如 [v-cloak] { display: none } 一起用时,这个指令可以隐藏未编译的 Mustache 标签直到实例准备完毕。 官方文档 https://cn.vuejs.org/api/built-in-directives.ht 阅读全文

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

moment.js 显示当前时间

摘要: 官方文档 http://momentjs.cn/ JavaScript moment().format('YYYY-MM-DD HH:mm:ss') 阅读全文

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

layui 搜索栏 checkbox 样式

摘要: .layui-form .layui-form-checkbox { height: 38px; line-height: 38px; } .layui-form .layui-form-checkbox i { height: 36px; } 提交表单时必须显式设置checkbox的值,否则会滞留 阅读全文

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

php smtp 发送邮件

摘要: /** * email smtp (support php7) * * Modified by: Reson 2017/06 * UPDATE: * 1、change ereg to preg_match;change ereg_replace to preg_replace. * 2、change 阅读全文

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

layui 在数据表格中显示rate星级 & 设置最低分

摘要: { title: '评价' , field: 'report_score' , align: 'right' , width: 200 , templet: function (d) { return '<div id="score' + d.report_id + '" title="' + d. 阅读全文

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

javascript 滚动到顶部

摘要: Examples 1 document.body.scrollTop=document.documentElement.scrollTop=0 Examples 2 document.body.scrollIntoView() 作用于某个元素 document.getElementById('id' 阅读全文

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

背景图片加表单居中

摘要: body { width: 100%; height: 100vh; background: url('./img/bg.jpg') no-repeat; background-size: cover; background-position: center center; background-a 阅读全文

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

百度地图关键字搜索并拾取坐标

摘要: HTML <script src="//api.map.baidu.com/api?v=2.0&ak={:C('BAIDU_MAP_KEY_BROWER')}"></script> <form class="layui-form"> <div class="layui-form-item"> <di 阅读全文

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

jQuery 生成二维码 QRCode.js

摘要: github https://github.com/davidshimjs/qrcodejs Examples1 <div id="qrcode"></div> <script type="text/javascript"> new QRCode(document.getElementById("q 阅读全文

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

js导出excel

摘要: 资源下载 https://files.cnblogs.com/files/sunr/js%E5%AF%BC%E5%87%BAexcel.zip?t=1662686273 HTML <script src="./js/jquery.min.js"></script> <script src="./js 阅读全文

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

php 两个日期间隔天数

摘要: $days=\date_diff(\date_create($this->row['vip_enddate']),\date_create(date('Y-m-d')))->days; $diff=\date_diff(\date_create($this->row['vip_enddate']), 阅读全文

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

javascript 获取来源 document.referrer

摘要: 这里要使用js location.href;$this->redirect()获取不到 // EntfavpersonController.class.php class EntfavpersonController extends BaseController{ function __constr 阅读全文

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

kindeditor使用|自定义工具栏|结合ThinkPHP使用

摘要: 链接 官方文档 自用修改版 HTML <textarea name="article_content" id="editor" style="width:100%;height:500px;" >{$row[article_content]}</textarea> <script src="/Pub 阅读全文

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

mysql将<br>标签替换成换行符

摘要: update `table_name` set field_name=replace(field_name,'<br>',char(10)) 阅读全文

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

layui多图上传(表单)带查看

摘要: HTML <div class="layui-form-item"> <div class="layui-form-label">banner</div> <div class="layui-input-inline"> <input name="fair_banner" value="{$row[ 阅读全文

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

mysql父子类排序|根据条件排序

摘要: select * from `position` where position_isshow=1 order by if(position_pid=0,position_id,position_pid),position_id 阅读全文

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

jQuery高亮页面中的关键字

摘要: github https://github.com/julmot/mark.js 相关说明 Examples <script src="/Public/js/jquery.min.js"></script> <script src="/Public/js/jquery.mark.min.js"></ 阅读全文

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

javascript url参数字符串-对象互转

摘要: function query2obj() { var query = window.location.search.substring(1) var obj = {} if (query) { var vars = query.split('&') for (var i = 0; i < vars. 阅读全文

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

jquery-viewer 图片查看/放大/缩小/旋转/翻转

摘要: github https://github.com/fengyuanchen/jquery-viewer Examples <link rel="stylesheet" href="/Public/css/viewer.min.css" > <script src="/Public/js/jquer 阅读全文

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

css选择前/后n个元素

摘要: /* 前3个元素 */ .layui-col-md4:nth-child(-n+3){ border:1px solid red; } /* 后3个元素 */ .layui-col-md4:nth-last-child(-n+3){ border:1px solid red; } 阅读全文

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

ThinkPHP提示美化

摘要: ThinkPHP/Tpl/dispatch_jump.tpl <?php if(C('LAYOUT_ON')) { echo '{__NOLAYOUT__}'; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " 阅读全文

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

mysql 游标 遍历

摘要: 3/4行、24行、7/8行字段的对应关系。变量名和字段名不要相同。 BEGIN DECLARE done BOOLEAN DEFAULT 0; DECLARE cur_ent_id VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ 阅读全文

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

接收阿里云上行短信

摘要: 表结构 DROP TABLE IF EXISTS `smsup`; CREATE TABLE `smsup` ( `smsup_id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, `smsup_sendtime` datetime(0) NOT NULL 阅读全文

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

ThinkPHP3原样输出字段名大小写

摘要: /Application/Common/Conf/config.php 'DB_PARAMS'=>[\PDO::ATTR_CASE=>\PDO::CASE_NATURAL], //原样输出数据库字段名大小写 阅读全文

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

mysql 今天过生日的会员

摘要: select * from `person` where substring(person_birthday,6,5)=date_format(curdate(),'%m-%d') 阅读全文

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

PHP替换<br>标签为换行符

摘要: $html=\preg_replace('/<br\\s*?\/??>/i',chr(13),$html); 阅读全文

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

mysql group_concat 缺失数据 | 修改my.ini 默认配置

摘要: 核心配置 group_concat_max_len = 9999999 相关配置 sql-mode = "NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" max_allowed_packet = 256M group_concat_max_len = 9999 阅读全文

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

vue客户端发送两次请求的解决办法

摘要: header中content-type 设为 application/x-www-form-urlencoded; header中不要设置其他参数。 阅读全文

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

javascript 时间字符串转时间戳

摘要: 字符串转时间戳 var str='2020-10-20 12:00:00' new Date(str.replace(/-/g,'/')).getTime() 当前时间戳 new Date().getTime() 阅读全文

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

jQuery 判断dom是否存在

摘要: if($('qrcode').length > 0){ //doSomething } 阅读全文

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

scrollbar.css

摘要: /* 根据实际需求,可以不要。 */ body { overflow-y: scroll; } ::-webkit-scrollbar { /*滚动条整体样式*/ width: 6px; /*高宽分别对应横竖滚动条的尺寸*/ height: 6px; } /*定义滚动条轨道 内阴影+圆角*/ ::- 阅读全文

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

sweetalert2的基本用法

摘要: github https://github.com/sweetalert2/sweetalert2/ theme https://github.com/sweetalert2/sweetalert2-themes Examples <link rel="stylesheet" href="https 阅读全文

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

tipso简单用法

摘要: github https://github.com/object505/tipso Examples <!--head--> <script src="//cdn.jsdelivr.net/npm/tipso/src/tipso.min.js"></script> <link rel="styles 阅读全文

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

PHP生日转星座/生日转生肖(属相)

摘要: 生日大专星座 function birthday2constellation($birthday=''){ $month = substr($birthday,5,2);//截取月 $day = substr($birthday,8,2);//截取日 $day = intval($day); $mo 阅读全文

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

ThinkPHP下载文件/删除文件(或路径)

摘要: 下载文件 function download($url='',$savePath=''){ $fileName=array_pop(str2arr($url,'/')); $localUrl='./upload/'.$savePath.'/'.$fileName; (new \Org\Net\Htt 阅读全文

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

php 获取浏览器/操作系统信息

摘要: 获取浏览器信息 function getUserBS($bs = null) { if (isset($_SERVER["HTTP_USER_AGENT"])) { $user_agent = strtolower($_SERVER["HTTP_USER_AGENT"]); } else { ret 阅读全文

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

php 正则获取文章中的图片路径

摘要: /** * 提取body中的img-url * @param string $body * @return array 路径数组 */ function getBodyImgs($body=''){ preg_match_all("/<img([^>]*)\s*src=('|\")([^'\"]+) 阅读全文

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

mysql5.7开启日志【windows】

摘要: 修改配置文件my.ini #开启日志 log_bin=M:/mysql_log/bin.log log_error=M:/mysql_log/error.err long_query_time=0.1 slow_query_log=ON slow_query_log_file=M:/mysql_lo 阅读全文

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

windows命令获取文件MD5/SHA1/SHA256

摘要: MD5 certutil -hashfile [filePath] MD5 SHA1 certutil -hashfile [filePath] SHA1 SHA256 certutil -hashfile [filePath] SHA256 阅读全文

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

ThinkPHP3使用PHPWord修改模板并下载

摘要: 下载(直接覆盖到/ThinkPHP目录) https://files.cnblogs.com/files/sunr/ThinkPHP_PHPWord.zip?t=1662682605 PHP $row=(new PersonModel())->find(\session('person_id')); 阅读全文

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

html/vue 输出textarea内容换行

摘要: CSS .p{ white-space: pre-line; } Examples <p style="white-space: pre-line;font-size:16px;color:#777;">{{row.ent_profile}}</p> 阅读全文

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

导航