重庆分公司,新征程启航

为企业提供网站建设、域名注册、服务器等服务

PHP获取指定日期

echo  date('Y-m-d h:i:s',time()-30*24*3600).'';   //通过计算的方式获得前30天的时间戳
echo date('Y-m-d h:i:s',time()-7*24*3600).'';     //通过计算的方式获得前7天前的时间戳
echo date('Y-m-d h:i:s',time()+30*24*3600).'
';     //通过计算的方式获取30天后的时间戳 echo date('Y-m-d h:i:s',strtotime("+1 day")).'';    //通过strtotime系统函数获取明天的时间戳 echo date('Y-m-d h:i:s',strtotime("-30 day")).'';   //通过strtotime系统函数获取30天前的时间戳 echo date('Y-m-d h:i:s',strtotime("-1 month")).'';  //通过strtotime系统函数获取30天前的时间戳 echo strtotime("2015-07-21 15:00:00").'';     //将制定的日期转换为时间戳 echo date('Y-m-d h:i:s',strtotime("2015-07-21 15:00:00"));

文章题目:PHP获取指定日期
网站链接:http://cqcxhl.cn/article/gdojoe.html

其他资讯

在线咨询
服务热线
服务热线:028-86922220
TOP