苹果5s id锁破解教程:ASP小问题 帮帮忙啊

来源:百度文库 编辑:高校问答 时间:2024/04/29 05:40:29
<!--#include file="inc/conn.asp" -->
<%
un=request.Form("username")
pwd=request.Form("password")

set Rs=server.CreateObject("adodb.Recordset")
sql="select * from userlogin where username='"+un+"' and password='"+pwd+"'"
Rs.open sql,conn,3,3
if Rs.recordcount=0 then
response.Redirect("error.asp?no=您输入的用户名或密码有误")
else
Response.Redirect"index.asp?id="+Rs("id")
end if
%>

运行后提醒我 “类型不匹配: '[string: "index.asp?id="]' ”
怎么改阿??

rs("id")应为数字型的,而数字型的数据不能直接参与运行的。把这句话改为
Response.Redirect"index.asp?id="+cstr(Rs("id"))就行了

在无法判断Rs("id")是数字还是字符时,使用&代替+进行联接才是正解。

Response.Redirect "index.asp?id="&Rs("id")

Response.Redirect"index.asp?id="+Rs("id") 这一句,把加号变成&