Khmerboy Guestbook
<%
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim ThisLine, PrintLine
Set FileObject = Server.CreateObject("Scripting.FileSystemObject")
GuestBookFile = Server.MapPath("guestbook.txt")
Set InputStream = FileObject.OpenTextFile(GuestBookFile, ForReading, False)
Do While Not InputStream.AtEndOfStream
ThisLine = split(InputStream.ReadLine, "vbCrLf ")
For x = LBound(ThisLine) To UBound(ThisLine)
If x = UBound(ThisLine) + 1 Then
PrintLint = ThisLine(x) + "
" + PrintLine
Else
PrintLine = ThisLine(x) + "
" + PrintLine
End If
Next
PrintLine = "
" + PrintLine
Loop
InputStream.Close
Set OutputStream = Nothing
Set FileObject = Nothing
Response.Write replace(PrintLine, "//vbReturn//", "
")
%>
Sign Guestbook