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...