% @LANGUAGE="VBSCRIPT"%> <% Option Explicit %>
| Name | Department | Home Phone | Extension <% CONST EmpData = "/employees.dat" CONST AppPath = "/test" Dim objFile, objStream, strFileData, strData Set objFile = Server.CreateObject("Scripting.FileSystemObject") Set objStream = objFile.OpenTextFile(Server.MapPath(AppPath) _ & EmpData, ForReading, FALSE, TriStateUseDefault) Do While objStream.AtEndOfStream <> True strFileData = objStream.ReadLine strData = Replace(strFileData, vbTab, " | ") Response.Write(" |
|---|---|---|---|---|
| " & strData & VBCrLf) Loop objStream.Close Set objStream = Nothing Set objFile = Nothing %> |