咨询热线:4006-75-4006

售前:9:00-23:30    备案:9:00-18:00    技术:7*24h

PHP判断今天是周几

2019-01-19 01:51:56 18231次

<?php

$days = array('日','一','二','三','四','五','六');

$today = date('w')-1;

$this_monday = strtotime('-'.$today.' day');

echo "今天是:星期",$days[$today],"<br></br>本周一:",date('Y-m-d',$this_monday),"<br></br>下周一:",date('Y-m-d',strtotime('+1 week',$this_monday));

?>


首页
最新活动
个人中心