Morpheusweb.it - Risorse per webmaster: script, ASP.NET, C#, Visual Basic .Net, tutorial, asp, javascript, css, php, html, java, ADO, VBScript, forms, frames, Active Server Pages, Dynamic HTML, database, gratis per webmaster e webdesigner

File content

How to read a file content


<%
Dim strLinea, FileObject, Instream, strFile, intTipo
strFile = Server.MapPath("testo.txt")
intTipo = 1 ' read
' create the object
Set FileObject = Server.CreateObject("Scripting.FileSystemObject")
' open the file
Set InStream = FileObject.OpenTextFile(strFile, intTipo, true)
' read all lines
strLinea = InStream.ReadAll()
Response.Write("<pre>" & strLinea & "</pre>" )
' free resouces
InStream.Close
Set InStream = Nothing
Set FileObject = Nothing
%>


Download code...


Print this page


 

Inizio pagina

risorse per webmaster