% Option Explicit Const ForReading = 1, ForWriting = 2, ForAppending = 8 'declare variable Dim objFS, objFile, objFile2, entries, textstream 'read guestbook entries into textstream Set objFS = Server.CreateObject ("Scripting.FileSystemObject") set objFile = objFS.GetFile(server.mappath("entries.dat")) set textstream = objFile.OpenAsTextStream(ForReading, -2) entries = textstream.ReadAll textstream.close %>
<% response.write(entries) %>