|
![]() | 作者: huarongdao [huarongdao]
![]() |
登录 |
<%@language=vbscript%> <%response.buffer=ture%> <html> <body> <% username=request.form("username") password=request.form("password") set myconn=server.createobject("adodb.connection") myconn.open "driver={microsoft access driver (*.mdb)};dbq=F:\Inetpub\wwwroot\butterfly\userinfo.mdb" sql="select * from [userinfo]" set RS=myconn.execute(sql) if username = RS("username") And password=RS("password") then ―――――――――――――――――――――――――――― response.redirect "go.html" &_ else response.redirect "error.html" &_ ―――――――――――――――――――――――――――――――― rs.close myconn.close set rs=nothing set myconn=nothing end if %> </body> </html> |
地主 发表时间: 05/14 22:47 |
![]() | 回复: 286 [unique] ![]() |
登录 |
response.redirect "go.html" &_ 1.去掉:"&_" 2.确认是"go.htm"还是"go.html" 3.还不行,则把该句放本程序第一行,再试试. |
B1层 发表时间: 05/15 09:03 |
![]() | 回复: huarongdao [huarongdao] ![]() |
登录 |
怎么放,IF从句总该在RS对象后面吧? 提示的错误是:答复对象 错误 'ASP 0156 : 80004005' 头错 /butterfly/login.asp,行18 HTTP 头已经写入到 客户浏览器。任何 HTTP 头的修改必须在写入页内容之前。 |
B2层 发表时间: 05/15 22:50 |
![]() | 回复: 286 [unique] ![]() |
登录 |
<% username=request.form("username") password=request.form("password") set myconn=server.createobject("adodb.connection") myconn.open "driver={microsoft access driver (*.mdb)};dbq=F:\Inetpub\wwwroot\butterfly\userinfo.mdb" sql="select * from [userinfo]" set RS=myconn.execute(sql) if username = RS("username") And password=RS("password") then response.redirect "go.html" else response.redirect "error.html" end if rs.close myconn.close %> |
B3层 发表时间: 05/16 09:06 |
|
20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon
粤ICP备05087286号