<% '***************************************************** '* Code written by Alexander Haneng (C) 1998-2001 * '* FREE download from http://www.haneng.com/ * '***************************************************** %>


<% MyFile = "guestbook.txt" 'Opens the guestbook file if it exists Set MyFileObj=Server.CreateObject("Scripting.FileSystemObject") IF MyFileObj.FileExists(MyFile) THEN Set MyTextFile=MyFileObj.OpenTextFile(MyFile) 'Reads a line, and outputs it WHILE NOT MyTextFile.AtEndOfStream %>
<%=MyTextFile.ReadLine%> <% WEND 'Closes the textfile MyTextFile.Close END IF' Does file exist %>