摘要: 源代码 /** * 验证码 */ public function getCode($num = "4", $w = "80", $h = "26") { $str = Array(); //用来存储随机码 $vcode = ""; $string = "ABCDEFGHIJKLMNPQRSTUVWX 阅读全文
posted @ 2020-07-18 17:25 办公魔盒 阅读(152) 评论(0) 推荐(0)
摘要: 源代码 public function moreimgupload() { $htmlfilename = 'files'; $new_folder='../../../www/data/upload/'; $allow_ext = array('jpg', 'jpeg', 'png', 'gif' 阅读全文
posted @ 2020-07-18 17:24 办公魔盒 阅读(134) 评论(0) 推荐(0)
摘要: 源代码 function get_curr_time_section() { $checkDayStr = date('Y-m-d ',time()); $timeBegin1 = strtotime($checkDayStr."09:00".":00"); $timeEnd1 = strtotim 阅读全文
posted @ 2020-07-18 17:23 办公魔盒 阅读(324) 评论(0) 推荐(0)
摘要: 源代码 /** * 计算两个时间戳之间相差的日时分秒 * @param $begin_time 开始时间戳 * @param $end_time 结束时间戳 * @return array */ function timediff($begin_time,$end_time) { if($begin 阅读全文
posted @ 2020-07-18 17:22 办公魔盒 阅读(2144) 评论(0) 推荐(0)
摘要: 源代码 判断时间 if(date('Y-m-d')==date('Y-m-d', strtotime($res[0]->createtime))){ $finance_day_num+=1; $finance_day_money+=$res[0]->payamount; } 阅读全文
posted @ 2020-07-18 17:21 办公魔盒 阅读(395) 评论(0) 推荐(0)
摘要: 源代码 //判断是否是微信浏览器 function isWeixin() { if (strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') !== false) { return true; } else { return false; } } 阅读全文
posted @ 2020-07-18 17:20 办公魔盒 阅读(395) 评论(0) 推荐(0)
摘要: 源代码 设置脚本运行时间 ini_set('max_execution_time', '0');//永久 阅读全文
posted @ 2020-07-18 17:19 办公魔盒 阅读(159) 评论(0) 推荐(0)
摘要: 源代码 /** * 缩放图片 * @param $filename 图片地址 * @param $per 缩放倍数 1.2 0.3 * @return string */ private function scaleImg($filename,$per){ $per_str=implode('_', 阅读全文
posted @ 2020-07-18 17:18 办公魔盒 阅读(125) 评论(0) 推荐(0)
摘要: 源代码 get请求 function mcurl_get($url) { $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); cur 阅读全文
posted @ 2020-07-18 17:17 办公魔盒 阅读(192) 评论(0) 推荐(0)
摘要: 相关方法 //判断某个字符是否在数组内 bool in_array ($needle,$array [,strict]) //例子: //分割字符串 preg_split(); //例子: $str='1,2,3,4'; preg_split('/,/',$str); //求数组交集,并集,差集 a 阅读全文
posted @ 2020-07-18 17:16 办公魔盒 阅读(108) 评论(0) 推荐(0)