<?php //phpµÄʱ¼äÊÇÒÔÃëËã¡£jsµÄʱ¼äÒÔºÁÃëËã date_default_timezone_set('PRC'); //date_default_timezone_set("Asia/Hong_Kong");//µØÇø //ÅäÖÃÿÌìµÄ»î¶¯Ê±¼ä¶Î $starttimestr = "2011-3-29 8:10:00"; $endtimestr = "2011-3-29 9:43:00"; $starttime = strtotime($starttimestr); $endtime = strtotime($endtimestr); $nowtime = time(); if ($nowtime<$starttime){ die("»î¶¯»¹Ã»¿ªÊ¼,»î¶¯Ê±¼äÊÇ£º{$starttimestr}ÖÁ{$endtimestr}"); } if ($endtime>=$nowtime){ $lefttime = $endtime-$nowtime; //ʵ¼ÊʣϵÄʱ¼ä£¨Ã룩 }else{ $lefttime=0; die("»î¶¯ÒѾ½áÊø£¡"); } ?>
<script language="JavaScript"> var runtimes = 0; function GetRTime(){ var nMS = <?php echo $lefttime; ?>*1000-runtimes*1000; if (nMS>=0){ var nD=Math.floor(nMS/(1000*60*60*24))$; var nH=Math.floor(nMS/(1000*60*60))$; var nM=Math.floor(nMS/(1000*60)) % 60; var nS=Math.floor(nMS/1000) % 60; document.getElementById("RemainD")[removed]=nD; document.getElementById("RemainH")[removed]=nH; document.getElementById("RemainM")[removed]=nM; document.getElementById("RemainS")[removed]=nS; if(nMS==5*60*1000) { alert("»¹ÓÐ×îºóÎå·ÖÖÓ£¡"); } runtimes++; setTimeout("GetRTime()",1000); } } window.onload=GetRTime; </script> <h4>¾àÀë»î¶¯½áÊø»¹ÓÐ <strong id="RemainD">XX</strong>Ìì <strong id="RemainH">XX</strong>Сʱ <strong id="RemainM">XX</strong>·ÖÖÓ <strong id="RemainS">XX</strong>Ãë</h4>
ÍƼöÐÅÏ¢
- ¡¾ÊÓƵ²¥·Å¡¿JplayerÊÓƵ²¥·ÅÆ÷µÄʹÓÃ
- memcacheÄÚ´æÔÀí
- Memcache¼¼Êõ·ÖÏí£º½éÉÜ¡¢Ê¹Óᢴ洢¡¢Ëã·¨¡¢ÓÅ»¯....
- php³£ÓÃÕýÔò±í´ïʽ
- phpÐÔÄܼà²âÄ£¿éXHProf
- ÈÃCI¿ò¼ÜÖ§³Öservice²ã
- ʹÓÃPHPÉú³É´øLOGOµÄ¸öÐÔ»¯¶þάÂëͼÏñ
- ¹ØÓÚCodeIgniterÄã¿ÉÄܲ»ÖªµÀµÄ5¸ö֪ʶµã
- Memcache ºÁÃ뼶³¬Ê±¼°ÆäËû³£¼ûÎÊÌâ»ã×Ü
- [PHP±Ê¼Ç]PHPQueryÒ»¸ö´¦ÀíDOMµÄÀûÆ÷
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
×î½ü¸üÐÂ
- PHP»ñÈ¡Óû§µÄÕæʵIP£¬²¢ÅжÏÊÇ·ñÄÚÍøIP
- PHP ´íÎóÈÕÖ¾ error_log
- ÀûÓÃbigpipe»úÖÆʵÏÖÒ³ÃæÄ£¿éµÄÒì²½äÖȾ chunked¼¼Êõ
- php¿ØÖÆÎļþÏÂÔØËÙ¶È
- js + php ¶ÁÈ¡¡¢²¥·ÅÊÓƵÁ÷ ¼æÈÝfirefox£¬c....
- ¡¾ÊÓƵ²¥·Å¡¿JplayerÊÓƵ²¥·ÅÆ÷µÄʹÓÃ
- UNICODE Óë UTF-8 µÄ¹Øϵ
- memcacheÄÚ´æÔÀí
- Memcache¼¼Êõ·ÖÏí£º½éÉÜ¡¢Ê¹Óᢴ洢¡¢Ëã·¨¡¢ÓÅ»¯....
- phpʹÓÃmb_detect_encoding¼ì²â×Ö·û´®±àÂë
ÆÀÂÛ