上一页 1 ··· 3 4 5 6 7 8 下一页
摘要: if(! function_exists ('write_log') ) { function write_log($data, $name='debug', $date=null){ if (is_array($data)) { $data = json_encode($data); } if (strpos($d... 阅读全文
posted @ 2016-12-20 15:52 桔子木木 阅读(1295) 评论(0) 推荐(0) 编辑
摘要: if (! function_exists ( 'multi_array_sort' )) { function multi_array_sort($arr, $keys, $type = 'desc') { $keysvalue = $new_array = array (); foreach ( $arr as $k => $v ) { ... 阅读全文
posted @ 2016-12-20 15:52 桔子木木 阅读(135) 评论(0) 推荐(0) 编辑
摘要: if (! function_exists ( 'diff_date' )) { function diff_date($date1, $date2){ $datestart = date ( 'Y-m-d', strtotime ( $date1 ) ); if (strtotime ( $datestart ) > strtotime ( $date2... 阅读全文
posted @ 2016-12-20 15:51 桔子木木 阅读(658) 评论(0) 推荐(0) 编辑
摘要: if(! function_exists ('get_rand_string') ) { function get_rand_string($len=6,$format='ALL') { switch($format) { case 'ALL': $chars='ABCDEFGHIJKLMNOPQRSTUVWX... 阅读全文
posted @ 2016-12-20 15:50 桔子木木 阅读(321) 评论(0) 推荐(0) 编辑
摘要: if (! function_exists ( 'parameter_filter' )) { function parameter_filter($str, $type = 'string', $filterhtml = 0) { $patterns [0] = "/script/"; $replacements [0] = ""; ks... 阅读全文
posted @ 2016-12-20 15:50 桔子木木 阅读(756) 评论(0) 推荐(0) 编辑
摘要: if(! function_exists ('timediff') ) { function timediff($begin_time,$end_time){ if($begin_time $days,"hour" => $hours,"min" => $mins,"sec" => $secs); return $res; } 阅读全文
posted @ 2016-12-20 15:49 桔子木木 阅读(2733) 评论(0) 推荐(0) 编辑
摘要: if(!function_exists('_GetContent')){ function _GetContent( $url ){ $ch = curl_init(); $ip = '220.181.108.91'; // 百度蜘蛛 $timeout = 15; curl_setopt($ch,CURLOPT_URL,... 阅读全文
posted @ 2016-12-20 15:47 桔子木木 阅读(1626) 评论(0) 推荐(0) 编辑
摘要: if(!function_exists('get_date_array')){ function get_date_array(){ $_NOW = time(); $today_begin = strtotime(date('Y-m-d',$_NOW)); $time = strtotime('-2 month', $_NOW); ... 阅读全文
posted @ 2016-12-20 15:46 桔子木木 阅读(540) 评论(0) 推荐(0) 编辑
摘要: $num = 10.4567; //第一种:利用round()对浮点数进行四舍五入 echo round($num,2); //10.46 //第二种:利用sprintf格式化字符串 $format_num = sprintf("%.2f",$num); echo $format_num; //10.46 ... 阅读全文
posted @ 2016-12-19 15:14 桔子木木 阅读(245546) 评论(1) 推荐(6) 编辑
摘要: 1. 函数向日期添加指定的时间间隔 2.计算年龄 3.拥有某个列的最大值的行 阅读全文
posted @ 2016-12-17 13:36 桔子木木 阅读(209) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 下一页