<form>
<input type="text" name="year" placeholder="请输入年份">
<input type="submit" name="计算">
</form>
<?php
$year=$_GET['year'];
if($year%4==0&&$year%100==0||$year%400==0)
{
echo "今年是闰年";
}
else{
echo "今年是平年";
}
?>
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
代码可以正常运行 没有你说的这些问题
把那个get方法该为post试一下行不行。