主要用strtotime()这个函数
php 获得前一个月的月份
date("Y-m-d",strtotime("last month"));
php获得给定时间的前一个月时间
$record="20101001";
date("Ymd",strtotime("last month",strtotime($record)));

 程序猿必读

posted on 2015-08-07 10:22  龙种人  阅读(2116)  评论(0编辑  收藏  举报