$time = time();
$err_msg = '请在周一至周五 9:00-17:00 提交申请!';
$week = date('w', $time);
$hour = date('H', $time);
if($week < 1 || $week > 5){
echo $err_msg;exit;
}
if($hour < 9 || $hour > 17){
echo $err_msg;exit;
}
$time = time();
$err_msg = '请在周一至周五 9:00-17:00 提交申请!';
$week = date('w', $time);
$hour = date('H', $time);
if($week < 1 || $week > 5){
echo $err_msg;exit;
}
if($hour < 9 || $hour > 17){
echo $err_msg;exit;
}
转载于:https://www.cnblogs.com/hefei/p/5818319.html