Home > php教程 > php手册 > php编写的闹钟程序

php编写的闹钟程序

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 11:35:04
Original
836 people have browsed it

php

//闹钟程序

error_reporting(7
);

ob_start
();

if (!isset(
$i
)) {

    
$msg'现在时间是: 'date('h:i:s') ."
赶快睡觉吧"
;

    
$t=time
();

    
refresh($msg,"funny.php?i=1&t1=$t",5
);

}elseif (
$i==1
){

    
$msg'现在时间是: 'date('h:i:s'
);

    
$t2=time
();

    
$t3=$t2-$t1
;

    
$msg.="
你睡了 $t3 秒, 该起床啦"
;

    
refresh($msg,'funny.php?i=2'
);

}elseif (
$i==2
) {

    

//  

    
print 

codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" 

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

type="application/x-oleobject">

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     


     
             type="application/x-mplayer2"

             pluginspage="http://www.microsoft.com/isapi/redir.dll?prd=windows&sbp=mediaplayer&ar=media&sba=plugin&"

             name="MediaPlayer" showcontrols="1" showpositioncontrols="0"

             showaudiocontrols="1" showtracker="1" showdisplay="0"

             showstatusbar="1"

             autosize="0"

             showgotobar="0" showcaptioning="0" autostart="1" autorewind="0"

             animationatstart="0" transparentatstart="0" allowscan="1"

             enablecontextmenu="1" clicktoplay="0" 

             defaultframe="datawindow" invokeurls="0">

     



EOT2;

}


function     
refresh($msg='',$url,$time='3'
){

    echo 
$msg."
"
;

    echo 
""
;

    

}

?>

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template