PHP determines time prompt information_PHP tutorial

WBOY
Release: 2016-07-13 17:45:58
Original
722 people have browsed it

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...
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!