Sorry the formatting went wrong while posting...use this
<%
Dim objFSO
Set objFSO = Server.CreateObject("Scrip
Dim objTextStream
const strFileName = "./fileName.txt"
const fsoForReading = 1
If objFSO.FileExists("./fileN
'The file exists, so open it and output its contents
Set objTextStream = objFSO.OpenTextFile(strFil
Response.Write "" & objTextStream.ReadAll & ""
objTextStream.Close
Set objTextStream = Nothing
Else
'The file did not exist
Response.Write strFileName & " was not found."
End If
'Clean up
Set objFSO = Nothing
%>
Main Topics
Browse All Topics





by: bugsPosted on 2007-07-25 at 10:55:37ID: 19568074
I don't know much of PHP, but seems like its reading from a text file and displaying it....If so then use below code
ting.FileS ystemObjec t")
ile.txt") then eName, fsoForReading)
<%
Dim objFSO
Set objFSO = Server.CreateObject("Scrip
Dim objTextStream
const strFileName = "./testFile.txt"
const fsoForReading = 1
If objFSO.FileExists("./testF
'The file exists, so open it and output its contents
Set objTextStream = objFSO.OpenTextFile(strFil
Response.Write "
" & objTextStream.ReadAll & "
"
objTextStream.Close
Set objTextStream = Nothing
Else
'The file did not exist
Response.Write strFileName & " was not found."
End If
'Clean up
Set objFSO = Nothing
%>