How to read file content using asp?

by Nirmala 2009-08-10 15:33:17

Hi..
Use the below code to read the file content using asp.
<%
Set fs=Server.CreateObject("Scripting.FileSystemObject")

Set f=fs.OpenTextFile(Server.MapPath("test.asp"), 1)
Response.Write(f.ReadAll)
f.Close

Set f=Nothing
Set fs=Nothing
%>

Tagged in:

876
like
1
dislike
0
mail
flag

You must LOGIN to add comments