<% ' Open News file (currentnews.txt) Dim objFSO Set objFSO = Server.CreateObject("Scripting.FileSystemObject") Dim objTextStream Dim qu Dim moretext const strFileName = "e:\inetpub\virtual\saveoceana\currentnews.txt" const fsoForReading = 1 Set objTextStream = objFSO.OpenTextFile(strFileName, fsoForReading) qu = Chr(34) moretext = "...more" ReadCurrentNews = objTextStream.Read(100) & moretext & "
" 'Clean up objTextStream.Close Set objFSO = Nothing Set objTextStream = Nothing ' Open weather file (testwx.txt) Const ForReading = 1, ForWriting = 2, ForAppending = 8 Dim f, myText, ts set fso = server.CreateObject("Scripting.FileSystemObject") set f = fso.GetFile("e:\inetpub\virtual\saveoceana\testwx.txt") set ts = f.OpenAsTextStream(ForReading, -2) Do While not ts.AtEndOfStream myText = myText & ts.ReadLine & "
" Loop set fso = nothing set f = nothing set ts = nothing %>
NEWS
<% Response.Write ReadCurrentNews %> Weather Report
<% Response.Write myText %>
<% Response.Write FormatDateTime(Date, 1) %>