我想把这个数据输出到这个文本框里?这个phpstorm确实挺好用
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<form action="p_switchmonth.php" method="post">
输入年份: <input type="text" name="yer"/>
输入月份: <input type="text" name="mth"/>
<input type="submit" value="提交" name=""/>
<!--这个月有 <input type="text" value="">-->
</form>
<?php
@$yer=$_POST['yer'] or die();
@$mth=$_POST['mth'] or die();
$yer=2017;
$mth=4;
if($mth ==1 || $mth == 3|| $mth == 5|| $mth == 7|| $mth == 8|| $mth == 10|| $mth == 12){
echo "这个月是31天";
}
else if($mth == 4|| $mth == 6|| $mth == 9|| $mth == 11){
echo "这个月是30天";
}
else if($mth == 2){
if(isrunnian($yer)){
echo "今年是闰年,这个二月是29天";
}
else{
echo "这个月是29天";
}
}
function isrunnian($yer){
if($yer%4 ==0 && !$yer%100 ==0 || $yer%400 ==0){
return true;
}
else{
return false;
}
}
?>
</body>
</html>