WEB发布错误,请高手指点!
我发布的程序是自己开发的,采集都没问题,测试发布也没问题,但是采集和发布一起做的时候就提示错误!我估计是发布时不自动登陆网站!下面是错误代码!<html>
<head>
<title>登录</title>
<link href="css.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" c>
<style type="text/css">
<!--
.style1 {font-size: 12px}
-->
</style>
</head>
<body>
<div align="center">
<form method="post" action="admin_login.asp">
<table border="1" width="45%" cellpadding="2" cellspacing="0" bordercolordark="#f7f7f7" bordercolorlight="#cccccc" class="css">
<tr>
<td bgcolor="#f7f7f7" height="30" colspan="2"><span class="style1">管理员登录</span></td>
</tr>
<tr>
<td><span class="style1">用户名</span></td>
<td><input type="text" name="us" size="30" maxlength="50" class="inputt"></td>
</tr>
<tr>
<td><span class="style1">密码</span></td>
<td><input type="password" name="pas" size="34" maxlength="50" class="inputt"></td>
</tr>
<tr>
<td bgcolor="#f7f7f7" height="30" colspan="2" align="center"><input type="submit" name="submit" value="登录" class="inputt"></td>
</tr>
</table>
</form>
</div>
</body>
</html>
下面是我的登陆页面代码
<html>
<head>
<title>登录</title>
<link href="css.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.style1 {font-size: 12px}
-->
</style>
</head>
<body>
<!-- #include file="conn.asp"-->
<!-- #include file="func.asp"-->
<%
dim us,pas,rs
us=request.form("us")
pas=md5(request.form("pas"))
if us<>"" then
set rs=server.createobject("adodb.recordset")
rs.open "select name,password from admin where name='"&us&"'",conn,1,1
if not rs.eof then
if pas=rs("password") then
session("name")=us
response.Write "<script language=javascript>alert('登陆成功!');location.href='index.asp';</script>"
else
response.write "<script>alert('用户密码不正确,请返回重新输入');history.back();</script>"
end if
else
response.write "<script>alert('用户名不正确,请返回重新输入');history.back();</script>"
end if
end if
%>
<div align="center">
<form method="post" action="admin_login.asp">
<table border="1" width="45%" cellpadding="2" cellspacing="0" bordercolordark="#f7f7f7" bordercolorlight="#cccccc" class="css">
<tr>
<td bgcolor="#f7f7f7" height="30" colspan="2"><span class="style1">管理员登录</span></td>
</tr>
<tr>
<td><span class="style1">用户名</span></td>
<td><input type="text" name="us" size="30" maxlength="50" class="inputt"></td>
</tr>
<tr>
<td><span class="style1">密码</span></td>
<td><input type="password" name="pas" size="34" maxlength="50" class="inputt"></td>
</tr>
<tr>
<td bgcolor="#f7f7f7" height="30" colspan="2" align="center"><input type="submit" name="submit" value="登录" class="inputt"></td>
</tr>
</table>
</form>
</div>
</body>
</html>
我制作发布模块
us=[用户名]&pas=[密码]&submit=¼
请指点下错误!谢谢! 把所有浏览器关闭,清楚所有COOKIE,然后开火车头,进行设置登陆,如何发布。 自己写的发布程序,那再写一个去掉用户验证不就完了.这样还快点
页:
[1]