function times($year){ $week = array('星期7','星期1','星期2','星期3','星期4','星期5','星期6'); echo (date("{$year}年m月d日 H:i:s").$week[date('w')])."\n\n";; // echo date('L')?'是闰年':'不是闰年'."\n\n"; if($year%4==0&&($year%100!=0||$year%400==0){echo $year.'是闰年';}else{echo $year.'不是闰年';} echo $year; echo $year.'全年有'.date('W').'周'."\n\n"; echo '这是'.$year.'全年的第'.date('z').'天'."\n\n"; echo $year.'这个月有'.date('t').'天'."\n\n";}echo times('2016');错误提示:PHP Parse error: syntax error, unexpected 'echo' (T_ECHO) in D:\phpStudy\PHPTutorial\WWW\htdocs\4-date.php on line 34Parse error: syntax error, unexpected 'echo' (T_ECHO) in D:\phpStudy\PHPTutorial\WWW\htdocs\4-date.php on line 34[Finished in 0.1s]
1 回答
- 1 回答
- 0 关注
- 1141 浏览
添加回答
举报
0/150
提交
取消