//顯示目前時間
$now=date("l");//英文的星期幾 Monday
echo $now;
echo "
";
echo getweek();
function getweek(){
$k=date('N');
switch ($k):
case '1':
$weday = '一';
break;
case '2':
$weday = '二';
break;
case '3':
$weday = '三';
break;
case '4':
$weday = '四';
break;
case '5':
$weday = '五';
break;
case '6':
$weday = '六';
break;
case '7':
$weday = '日';
break;
endswitch;
return '星期'.$weday;
}
?>