编程爱好者之家
function secToTime($seconds){ $result = '00:00:00'; if ($seconds>0) { $hour = floor($seconds/3600); $minute = floor(($seconds-3600 * $hour)/60); $second = floor((($seconds-3600 * $hour) - 60 * $minute) % 60); $result = $hour.':'.$minute.':'.$second; } return $result; }