<?php
$week=date("w");
if($week<"6"){
echo "Not yet Weekend. Keep working...";
}else{
echo "What to do";
}
?>
如题?
PHP中文网2017-10-13 12:57:19
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
寻觅 beyond2017-10-12 22:57:04
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