当选择今天的日期为from_date时,它会显示“Not ok”消息。谁能帮我这个?我正在使用PHP。
return $validator->errors()->first('name');
答案 0 :(得分:0)
尝试以下代码:
$today_date = date("d/m/y");
$from_date = "01/04/2017";
$to_date = "05/04/2017";
if((strtotime($today_date) >= strtotime($from_date)) && (strtotime($today_date) <= strtotime($to_date)))
{
echo("ok");
} else {
echo("Not ok");
}