摘要: //上传图片 public function upload_imageApi(SysArticleImageRequest $Request) { $usrStr = $Request->getScheme() . '://' . $Request->getHost(); $fileInfos = 阅读全文
posted @ 2024-06-26 14:46 俊豪(Alvin) 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 比如<select class="selector"></select> 1、设置value为pxx的项选中 $(".selector").val("pxx"); 2、设置text为pxx的项选中 $(".selector").find("option[text='pxx']").attr("sel 阅读全文
posted @ 2021-12-22 17:59 俊豪(Alvin) 阅读(549) 评论(0) 推荐(0) 编辑
摘要: 1、引入form组件require(['form'], function(Form){}); 2、生成form元素 3、绑定事件之验证(也可以绑定总表单事件Form.events.bindevent(form))Form.api.bindevent(form, success, error, sub 阅读全文
posted @ 2021-11-13 17:46 俊豪(Alvin) 阅读(1075) 评论(0) 推荐(0) 编辑
摘要: 单个字符分割strings="abcdeabcdeabcde";string[]sArray=s.Split('c');foreach(stringiinsArray)Console.WriteLine(i.ToString());输出下面的结果:abdeabdeabde多个字符分割strings= 阅读全文
posted @ 2021-11-11 17:13 俊豪(Alvin) 阅读(4825) 评论(0) 推荐(0) 编辑
摘要: // 方法一:通过计算时间戳function getAgeByID($id){ //过了这年的生日才算多了1周岁 if(empty($id)) return ''; //获得出生年月日的时间戳 $date=strtotime(substr($id,6,8)); //获得今日的时间戳 $today=s 阅读全文
posted @ 2021-09-23 14:33 俊豪(Alvin) 阅读(613) 评论(0) 推荐(0) 编辑
摘要: 问题描述:新站站点可以使用 关机再开不能使用 新建站点 不能访问接口 可以访问首页 接口404 直接入正题 入口文件夹里有一个文件.htaccess 这个文件打开如果没有内容 问题就出现在这 <IfModule mod_rewrite.c> Options +FollowSymlinks Rewri 阅读全文
posted @ 2021-09-22 14:23 俊豪(Alvin) 阅读(595) 评论(0) 推荐(0) 编辑
摘要: <?php$zero1=date(“y-m-d h:i:s”);$zero2=”2010-11-29 21:07:00′;echo “zero1的时间为:”.$zero1.”<br>”;echo “zero2的时间为:”.$zero2.”<br>”;if(strtotime($zero1)<strt 阅读全文
posted @ 2021-09-18 10:53 俊豪(Alvin) 阅读(62) 评论(0) 推荐(0) 编辑
摘要: floor($number * 100) / 100 各位大侠们 看完扫个红包呗,可以省钱,免费的哦,扫完了别忘了用。也可以直接把红包发给我,多少都不闲,就是喜欢听那个声音。!!!! 阅读全文
posted @ 2021-09-16 11:02 俊豪(Alvin) 阅读(319) 评论(0) 推荐(0) 编辑
摘要: datediff函数,返回值是相差的天数,不能定位到小时、分钟和秒。 -- 相差2天select datediff('2018-03-22 09:00:00', '2018-03-20 07:00:00'); TIMESTAMPDIFF函数,有参数设置,可以精确到天(DAY)、小时(HOUR),分钟 阅读全文
posted @ 2021-07-01 16:12 俊豪(Alvin) 阅读(548) 评论(0) 推荐(0) 编辑
摘要: 两个时间差: MySQL datediff(date1,date2):两个日期相减 date1 - date2,返回天数。 select datediff('2008-08-08', '2008-08-01'); -- 7 select datediff('2008-08-01', '2008-08 阅读全文
posted @ 2021-07-01 16:09 俊豪(Alvin) 阅读(371) 评论(0) 推荐(0) 编辑