/* * 功能:倒计时 * 描述:@unix_timestamp. * 日期:2008-7-5 */ function countdown($unix_timestamp) { $date = $unix_timestamp-time(); $day = $date/60/60/24; $days = (int)$day; $hour = $date/60/60 - $days*24; $hours = (int)$hour; $minute = $date/60 - $days*24*60 - $hours*60; $minutes = (int)$minute; $second = $date - $days*24*60*60 - $hours*60*60 - $minutes*60; $seconds = (int)$second; $result = array($days,$hours,$minutes,$seconds); return $result; }