摘要: function formatDate(date) { var date = new Date(date); var YY = date.getFullYear() + '-'; var MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() 阅读全文
posted @ 2024-02-11 17:54 85541585 阅读(16) 评论(0) 推荐(0) 编辑
摘要: Date.prototype.Format = function (fmt) { //author: meizz var o = { "M+": this.getMonth() + 1, //月份 "d+": this.getDate(), //日 "H+": this.getHours(), // 阅读全文
posted @ 2024-02-11 17:49 85541585 阅读(3) 评论(0) 推荐(0) 编辑
摘要: thinkphp 数据嵌套输出 $list=Db::name('a')->field('id,xxx,...')->group('rwid')->select(); $data['list']=[]; foreach ( $list as $v){ $part=Db::name('a')->fiel 阅读全文
posted @ 2023-03-05 00:28 85541585 阅读(41) 评论(0) 推荐(0) 编辑
摘要: PHP保存$data = preg_replace("/[\r\n]+/", '##', $a); //将回车键替换##保存JS 读取 var str1 = ldata.data.replace(/##/g,"\n"); //将数据##替换成回车显示 阅读全文
posted @ 2023-02-17 10:45 85541585 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 1. 使用 return 返回值进行获取函数内部变量 function test() { var testValue = 'innerValue'; return testValue;} console.log(test()); // 'innerValue'2. 通过闭包方式进行获取函数内部变量 阅读全文
posted @ 2021-09-09 16:37 85541585 阅读(920) 评论(0) 推荐(0) 编辑
摘要: $group=Db::name('auth_group')->select();foreach ($group as $v){ $v['auth_group_access']=Db::name('auth_group_access')->where('group_id',$v['id'])->sel 阅读全文
posted @ 2021-08-08 08:33 85541585 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 换行、回车、空格分隔成数组 var arra2=a2.split(/[(\r\n)\r\n]+/);for(let i=0; i<arra2.length; i++){ if(arra2[i] ""){ arra2.remove(arra2[i]); }} 进行的识别分隔。其中\n代表换行,\r代表 阅读全文
posted @ 2021-07-04 21:05 85541585 阅读(533) 评论(0) 推荐(0) 编辑
摘要: // 方法1:insertGetId方法,新增数据并返回主键值使用getLastInsID Db::name('user')->insert($data); $userId = Db::name('user')->getLastInsID(); // 方法2:使用insertGetId方法 Db:: 阅读全文
posted @ 2021-06-29 23:32 85541585 阅读(2950) 评论(0) 推荐(0) 编辑
摘要: 查找某用户点击每个产品的最新的5条记录 SELECT max(id) AS maxid,pid FROM `u_b_history` where uid='1' GROUP BY `pid` ORDER BY `maxid` DESC LIMIT 5 阅读全文
posted @ 2021-06-06 22:06 85541585 阅读(573) 评论(0) 推荐(0) 编辑
摘要: 前提条件 “证书状态”为“已签发”。 已下载SSL证书,具体操作请参见下载证书。 约束条件 证书安装前,务必在安装SSL证书的服务器上开启“443”端口,同时在安全组增加“443”端口,避免安装后仍然无法启用HTTPS。 如果一个域名有多个服务器,则每一个服务器上都要部署。 待安装证书的服务器上需要 阅读全文
posted @ 2021-05-27 11:32 85541585 阅读(331) 评论(0) 推荐(0) 编辑