如果当前日期是星期五下面的代码返回“Have a nice weekend!”,否则返回 “Have a nice day!”
<html> <body> <?php $d=date("D"); if ($d=="Fri") echo "Have a nice weekend!"; else echo "Have a nice day!"; ?> </body> </html>
如果当前日期是星期五下面的代码返回“Have a nice weekend!”,否则返回 “Have a nice day!”
<html> <body> <?php $d=date("D"); if ($d=="Fri") echo "Have a nice weekend!"; else echo "Have a nice day!"; ?> </body> </html>