Why is w in date("w") less than 6? ?
益伦
益伦 2017-10-12 20:40:44
0
3
1481

<?php

$week=date("w");

if($week<"6"){

echo "Not yet Weekend. Keep working...";

}else{

echo "What to do";

}

?>

如题?


益伦
益伦

reply all(3)
猪哥

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...

寻觅 beyond

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

  • reply It turned out to be to get the time on the computer, thank you hahaha
    益伦 author 2017-10-13 13:23:44
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template