Code _php tips for getting the date of the day before and yesterday in PHP
Source: Internet
Author: User
It was the same thing when I went to the interview the day before yesterday, but I couldn't remember it at the time. Remember Date_sub (now (), ' Interval 1 days ') in MySQL;d ate (' y/m/d h:i:s ', mktime (date (' H '), date (' I ') , date (' s '), date (' m '), date (' d ') +1, date (' Y '));
Before the time is always very annoying, oh, learned, the following is the time next week now.
Date_default_timezone_set (' Asia/shanghai ');
$tmp = time () +60*60*24*7;
Print date ("m/d/y h:i:s", $tmp);
QUOTE:
Original post was published by hutule110 at 2007-3-22 09:51
Date ("Y/m/d h:i:s", Mktime (0,0,0,date ("M"), Date ("D") -1,date ("Y"));
This is good!
QUOTE:
Original post was published by hutule110 at 2007-3-22 09:51
Date ("Y/m/d h:i:s", Mktime (0,0,0,date ("M"), Date ("D") -1,date ("Y"));
Calling a function more often
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service