请求解决方法...我是新手..这个解决不了..
原文如下..<!-- #include file="function.asp" -->
<%
randomize
verify = int(99999999 * rnd())
act = saferequest(request.querystring("act"), 0)
if act = "login" then
admin_id = saferequest(request.form("admin_id"), 0)
password = saferequest(request.form("password"), 0)
code = saferequest(request.form("code"), 1)
if len(admin_id) < 1 or len(password) < 1 then call msgbox("错误:\n请输入管理员帐号、密码。", "-1")
if code <> session("tangming_code_0258") then call msgbox("错误:\n输入的验证码不正确。", "-1")
set rs = server.createobject("adodb.recordset")
sql = "select [password], [login_time], [login_ip], [verify] from [" & dbmunber & "admin] where [admin_id] = '" & admin_id & "'"
rs.open sql, conn, 1, 3
if rs.recordcount = 0 then call msgbox("错误:\n输入的管理员帐号不正确。", "-1")
if rs(0) <> md5(password) then call msgbox("错误:\n输入的管理员密码不正确。", "-1")
response.cookies("tangming_cook_0304")("admin_id") = admin_id
response.cookies("tangming_cook_0304")("admin_verify") = verify
response.cookies("tangming_cook_0304")("admin_time") = rs(1)
response.cookies("tangming_cook_0304")("admin_ip") = rs(2)
rs(1) = now()
rs(2) = myip
rs(3) = verify
rs.update
rs.close
set rs = nothing
response.redirect "index.asp"
response.end
end if
if act = "logout" then
set rs = server.createobject("adodb.recordset")
sql = "select [verify] from [" & dbmunber & "admin] where [admin_id] = '" & admin_id & "'"
rs.open sql, conn, 1, 3
if rs.recordcount > 0 then
rs(0) = verify
rs.update
end if
rs.close
set rs = nothing
response.cookies("tangming_cook_0304")("admin_id") = ""
response.cookies("tangming_cook_0304")("admin_verify") = ""
response.cookies("tangming_cook_0304")("admin_time") = ""
response.cookies("tangming_cook_0304")("admin_ip") = ""
response.redirect "login.asp"
response.end
end if
%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www. lang="gb2312">
<head>
<title>
管理员登录 <%= ename %>
</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<meta http-equiv="content-language" content="zh-cn" />
<meta http-equiv="x-ua-compatible" content="ie=emulateie7" />
<meta http-equiv="window-target" content="_top" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="keywords" content="<%= ekeywords %>" />
<meta name="description" content="<%= edescription %>" />
<meta name="author" content="" />
<link rel="shortcut icon" href="/favicon.ico" type="image/vnd.microsoft.icon" />
<link rel="icon" href="/favicon.ico" type="image/vnd.microsoft.icon" />
<link rel="stylesheet" type="text/css" href="admin.css" />
<script type="text/javascript" src="../function.js"></script>
</head>
<body>
<div id="web_main">
<div class="login_main" onclick="crecode($('imgcode').src);">
<form method="post" action="login.asp?act=login">
管理员:<input type="text" name="admin_id" class="input" /><br />
密 码:<input type="password" name="password" class="input" /><br />
验证码:<input id="code" type="text" name="code" maxlength="4" onkeypress="checode();" class="input code" /> <img id="imgcode" src="images/loading.gif" alt="看不清楚,请点击刷新验证码!" onclick="refcode();" class="pointer" /><br />
<input name="button_sub" type="submit" value="登录" class="input submit float_r pointer" />
</form>
</div>
<div class="login_copyright">版权所有 © <a href="<%= eurl %>"><%= ename %></a></div>
</div>
</body>
</html>
我在本地用IIS测试的提示错误如下:
无法显示网页
试图访问的网页出现问题,无法显示。
--------------------------------------------------------------------------------
请尝试执行下列操作:
单击刷新按钮,或稍后重试。
打开 localhost 主页,然后查找与所需信息相关的链接。
HTTP 错误 500.100 - 内部服务器错误 - ASP 错误
Internet 信息服务
--------------------------------------------------------------------------------
技术信息(用于支持人员)
错误类型:
ADODB.Recordset (0x800A0CB3)
当前记录集不支持更新。这可能是提供程序的限制,也可能是选定锁定类型的限制。
/admin/login.asp, 第 22 行
浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; InfoPath.2)
网页:
POST 66 ??? /admin/login.asp
POST Data:
admin_id=admin&password=admin888&code=2858&button_sub=%B5%C7%C2%BC
时间: