熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> PHP編程 >> 正文

php編寫的鬧鐘程序

2022-06-13   來源: PHP編程 

  <?php

//鬧鐘程序

error_reporting(
);

ob_start
();

if (!isset($i
)) {

    $msg= 現在時間是:  date(h:i:s"<BR>趕快睡覺吧"
;

    $t=time
();

    refresh($msg"funnyphp?i=&t=$t"
);

}elseif ($i==
){

    $msg= 現在時間是:  date(h:i:s
);

    $t=time
();

    $t=$t$t
;

    $msg="<BR>你睡了 $t 秒 該起床啦"
;

    refresh($msgfunnyphp?i=
);

}elseif ($i==
) {

    

//  

    
print <<<EOT

<object id="MediaPlayer" width="" height="" classid="CLSID:dfbfdabcce

codebase="#Version=

align="baseline" border="" standby="Loading Microsoft Windows Media Player components

type="application/xoleobject">

     <param name="invokeURLs" value="">

     <param name="FileName" value="

     <param name="ShowControls" value="">

     <param name="ShowPositionControls" value="">

     <param name="ShowAudioControls" value="">

     <param name="ShowTracker" value="">

     <param name="ShowDisplay" value="">

     <param name="ShowStatusBar" value="">

     <param name="AutoSize" value="">

     <param name="ShowGotoBar" value="">

     <param name="ShowCaptioning" value="">

     <param name="AutoStart" value="">

     <param name="PlayCount" value="">

     <param name="AnimationAtStart" value="">

     <param name="TransparentAtStart" value="">

     <param name="AllowScan" value="">

     <param name="EnableContextMenu" value="">

     <param name="ClickToPlay" value="">

     <param name="DefaultFrame" value="datawindow">


     <embed src="

             type="application/xmplayer"

             pluginspage="

             name="MediaPlayer" showcontrols="" showpositioncontrols=""

             showaudiocontrols="" showtracker="" showdisplay=""

             showstatusbar=""

             autosize=""

             showgotobar="" showcaptioning="" autostart="" autorewind=""

             animationatstart="" transparentatstart="" allowscan=""

             enablecontextmenu="" clicktoplay="

             defaultframe="datawindow" invokeurls="">

     </embed>

</object>

EOT;

}


function     refresh($msg=$url$time=
){

    echo $msg"<BR>"
;

    echo "<meta httpequiv=refresh content="$time;url=$url">"
;

    

}

?>


From:http://tw.wingwit.com/Article/program/PHP/201311/20880.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.