为什么一直提示404 not

Fcfuck 2018-10-03 10:40:16
post表单提交数据,显示找不到文件,可是get方法可以获取提交的数据,这是什么原因
//前台代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>利用$_GET和$_POST变量的输出页面</title>
<style type="text/css">
<!--
.STYLE1 {
color: #990000;
font-weight: bold;
font-size: 36px;
}
.STYLE2 {font-size: 12px}
-->
</style>
</head>
<body>
<form id="form1" name="form1" method="GET" action="get.php">
<p align="center" class="STYLE1">使用$_GET变量提交数据</p>
<p align="center">
<span class="STYLE2">用户名:</span>
<label>
<input name="user" type="text" size="15" id="user" />
</label>
<span class="STYLE2">密码:</span>
<label>
<input name="pass" type="password" size="15" id="pass" />
</label>
<label>
<input type="submit" name="Submit" value="提交" />
</label>
</p>
</form>
<form id="form2" name="form2" method="POST" action="post.php">
<p align="center" class="STYLE1">使用$_POST变量提交数据</p>
<p align="center">
<span class="STYLE2">用户名:</span>
<label>
<input name="user" type="text" size="15" id="user" />
</label>
<span class="STYLE2">密码:</span>
<label>
<input name="pass" type="password" size="15" id="pass" />
</label>
<label>
<input type="submit" name="Submit2" value="提交" />
</label>
</p>
</form>

</body>
</html>


//后台代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>利用$_GET变量的输出页面</title>
</head>

<body>
<?php
if(isset($_GET['Submit']) and $_GET['Submit']=="提交"){
echo "用户名为:".$_GET['user']."<br>";
echo "密码为:".$_GET['pass'];
}
?>
</body>
</html>

---------------------------------------------
--------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>利用$_POST变量的输出页面</title>
</head>

<body>
<?php
if(isset($_POST['Submit2']) and $_POST['Submit2']=="提交") {
echo "用户名为:" . $_POST['user'] . "<br>";
echo "密码为:" . $_POST['pass'];
}
?>
</body>
</html>



...全文
321 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

1,650

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 非技术类
社区管理员
  • 非技术类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧