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'
?>
http://www.bkjia.com/PHPjc/478620.htmlwww.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