function clear()
 {
     $lDate = get_date_add('m', -1, date('Y-m-d H:i:s'));
     $where = 'addTime <' . strtotime($lDate);
     $this->where($where)->delete();
     return result_data(1, '一个月前的数据清除成功');
 }
Beispiel #2
0
/**
 * 获取一个月的最后一天
 *
 * @param $d string
 */
function get_month_last($date)
{
    return get_date_add('d', -1, date('Y-m-1', strtotime(get_date_add('m', 1, $date))));
}