<?php
$week=date("w");
if($week<"6"){
echo "Not yet Weekend. Keep working...";
}else{
echo "What to do";
}
?>
如题?
You print data('w') in sequence; and then modify the local computer time. Do a time test for a week. You will understand the purpose of this function after looking at the results. Try more and get hands-on
It’s equal to five. Continue to work...
w The day of the week, the number indicates 0 (meaning Sunday) to 6 (meaning Saturday)
10-12 is Thursday, of course less than 6, feel free to go to work
You print data('w') in sequence; and then modify the local computer time. Do a time test for a week. You will understand the purpose of this function after looking at the results. Try more and get hands-on
It’s equal to five. Continue to work...
w The day of the week, the number indicates 0 (meaning Sunday) to 6 (meaning Saturday)
10-12 is Thursday, of course less than 6, feel free to go to work