<?php

date_default_timezone_set ( "Asia/Shanghai" );
$kaimu = mktime ( 4, 0, 0, 07, 28, 2012 );
//echo date ( "Y-m-d H:i:s", $kaimu );
//echo "<br/>";
//echo date ( "Y-m-d H:i:s", time () );
$timecha = $kaimu - time ();

mkdaojishi ( $timecha );
function mkdaojishi($timecha) {
$miao = $timecha % 60;
$fen = floor ( $timecha / 60 );
if ($fen > 60) {
$shi = floor ( $fen / 60 );
$fen=$fen%60;
}

if ($miao<10){$miao="0".$miao;}
if ($fen<10){$fen="0".$fen;}
if ($shi<10){$shi="0".$shi;}
$dangqian=date("Y-m-d H:i:s",time());
echo "Now Time:$dangqian,<b>距倫敦奧運會開幕還有:<font color='red'>$shi:$fen:$miao</font></b>";
}
?>

創作者介紹
創作者 shadow 的頭像
shadow

資訊園

shadow 發表在 痞客邦 留言(0) 人氣()