当前位置:网站首页>PHP determines whether the current time has exceeded

PHP determines whether the current time has exceeded

2022-06-22 03:56:00 one billion two million seven hundred and ten thousand and thir

<?php
$sj="11:00:00"; // For example, the same day 11 The output before the point is calculated as the output of the previous day 
$dtrq = date('Y-m-d ',time()); // Date of the day 
$jz = strtotime($dtrq."$sj"); // Concatenate the time and convert it to a timestamp 
$dq = time(); // Timestamp of current time 
if($dq <= $jz){
     // Determine the timestamp size 
	echo " No timeout ";
	echo date("Y-m-d",strtotime("-1day",strtotime($dtrq))); // If not more than 11 spot , Get the date of the previous day 
}else{
    
	echo " Overtime ";
}
?>
原网站

版权声明
本文为[one billion two million seven hundred and ten thousand and thir]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/173/202206220341373769.html