Home >Backend Development >PHP Tutorial >PHP determines time prompt information_PHP tutorial

PHP determines time prompt information_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-13 17:45:58791browse

Zheng Min

date_default_timezone_set('PRC');//Judge the time zone

echo date("H");

If(date("H")>=22 || date("H")<6){//Set the time period

echo 'It's night now, need to rest';

}

       else

echo 'Working time has begun'

?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/478620.htmlTechArticleZheng Min? date_default_timezone_set(PRC);//Judge the time zone echo date(H); if(date(H) =22 || date(H)6){//Set the time period echo It's night now, need to rest; } else echo Working time has begun...
Statement:
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