programming-examples/asp/More_Code_Snippets/This example reads the first 10 characters of a file.asp

10 lines
268 B
Plaintext
Raw Normal View History

2019-11-18 14:25:58 +01:00
<%
Dim objFSO , objFile
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(Server.MapPath("testfile.txt") , 1)
Response.Write (objFile.Read(10))
objFile.Close
Set objFSO = Nothing
Set objFile = Nothing
%>