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

PHP determines time prompt information_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:45:58713browse

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