All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
ASP.NET,2.0,HttpHandler实现生成图片验证码(示例代码下载)_[Asp.Net教程]
Visual,Studio,2008,简体中文版下载_[Asp.Net教程]
SQL Server数据库恢复操作实例_[SQL Server教程]
visual c++中添加ActiveX控件
十三 表格 Tables 二_[Html教程]
ASP.NET生成饼图功能实例代码_[Asp.Net教程]
asp.net2.0服务器控件之CheckBox控件
.NET基础知识-.NET框架_[Asp.Net教程]
asp.net2.0服务器控件之ListBox控件
SQL使用--Shrink所有数据库的Log_mssql学习_编程技术
Reading number is top 10 pictures
The little girl with long hair3
Summer is most suitable for young people to travel in China5
A man's favorite things1
Abdominal hit by iron--HangZhou best driver parking save passengers
Look for from human art net, is good--3
Breasts woman big set 1
美女和狗狗1
Fan bingbing black wings for platform and DanLuoWang believes beauty1
Sanya, hainan Haitian party feast promiscuity
美女
Download software ranking
Wild things 2
JSP+Ajax Web development typical examples
Unix video tutorial5
变速齿轮3.26
VC++6.0简体中文版
VC++6.0培训教程
Kung fu panda - the secret of the teacher
Boxer's Top ten classic battle9
虚拟机5.5.3版
apache-tomcat-6.0.33
归海一刀 published in(发表于) 2014/2/17 7:41:14 Edit(编辑)
一个处理PHP中时间加减的函数_[PHP教程]

一个处理PHP中时间加减的函数_[PHP教程]

一个处理PHP中时间加减的函数_[PHP教程]
在开发过程当中对于时间的操作很是让人头疼。在PHP文档中找到了一个很好的函数,可以对时间进行加减,还是很有意思的。
int strtotime ( string time [, int now] ) 
返回类型 int
函数可用于时间转换和加减。
下面将举个小例子,获得当前时间加上一周后的时间。
例子:

//获得当前时间
//date()格式化时间返回String类型。
$current_date = date(’Y-m-d’,time());
//根据当前时间加一周后
$weekLater = date(’Y-m-d’,strtotime("$current_date + 1 week"));
echo $weekLate;
// 2009-05-26 加一天的日期
$tomorrow = date(’Y-m-d’,strtotime("2009-05-26 + 1 day"));
echo $tomorrow; // 2009-05-27


添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.