1. /**
    2. * Function gettime
    3. * 时间转换(将时分秒转换为秒)
    4. * @param $n INT秒
    5. */
    6. public function gettime($time){
    7. $explodetime1 = explode("时",$time);
    8. $time_shi=$explodetime1[0];
    9. $explodetime2 =explode("分",$explodetime1[1]);
    10. $time_fen=$explodetime2[0];
    11. $explodetime3 = explode("秒",$explodetime2[1]);
    12. $time_miao=$explodetime3[0];
    13. $timeallmiao = $time_shi*3600+$time_fen*60+$time_miao;
    14. return $timeallmiao;
    15. }