这段asp代码是什么意思

2025-04-07 15:12:40
推荐回答(2个)
回答1:

大致看起来像是用户名密码的判断
if isim="" then '如果isim(可能是用户名)为空
Response.Write("") '弹出对话框并转到login.asp
response.End '结束
end if
if pwd="" then '如果密码为空
Response.Write("") '弹出对话框并转到login.asp
response.End '结束
end if
set rs=server.CreateObject("adodb.recordset")
sql="select * from user where name='"&isim&"' and pass='"&pwd&"'" '判断该用户名密码是否在数据库中存在
rs.open sql,conn,1,1
if rs.eof and rs.bof then '如果不存在相关记录
Response.Write("") '弹出对话框并转到login.asp
response.End '结束
end if

回答2:

登陆的验证

第一个if判断如果isim为空 那么就弹出个对话框提示1111111111 并且返回login.asp
第二个if判断如果pwd为空 那么就弹出个对话框提示222222222 并且返回login.asp

下面是在数据库里搜索数据 找到name=isim并且pass=pwd的那一条数据
下面的if是如果数据库不存在这条数据 那么就弹出对话框提示3333333333 并且返回login.asp