What I want to introduce to you today is about
PHP printing arbitrary time code:
- < ?php
- date_default_timezone_set
('Asia/Shanghai'); - $a = date ('Y-m-d H:i:s',
strtotime('-1 day')); - echo $a;
- ?>
The above PHP print any time code can print the day before Time, use a similar method to print any specific time you require. Among them - is the corresponding time in the past, and + is the corresponding time in the future.
- -1 year
- -1 month
- -1 day
- -1 hour
- -1 minute
- -1 second
http://www.bkjia.com/PHPjc/445991.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/445991.htmlTechArticleWhat I want to introduce to you today is about PHP printing arbitrary time code: ?php date_default_timezone_set ('Asia/Shanghai '); $ a = date ('Y-m-dH:i:s', strtotime('-1day')); echo$a...