比如,模块创建了日期字段为到期日期,调用出还有多少天到期。
show.html
相差{$date=floor((strtotime($daoqiriqi)-strtotime(date("Y-m-d")))/86400);}天
循环中
相差{$date=floor((strtotime($t.daoqiriqi)-strtotime(date("Y-m-d")))/86400);}天