传入时间戳或时间格式的字符串都可以自动返回时间字符串,自动判断/***时间戳格式化*@paramint$time*@returnstring完整的时间显示*@authorhuajie*/functiontime_format($time=NULL,$format='Y-m-dH:i:s'){if(preg_match('/\d{1,4}[^\d]+\d{1,2}[^\d]+\d{1,2}(\s+\d{1,2}[^\d]+\d{1,2}[^\d]+\d{1,2})?/',$time)){return$time;}else{return$time===NULL?date($format,time(