摘要: 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) 编辑