Leer Archivos Planos Con ASO
Con este sencillo Codigo Podremos leer un fichero de texto con asp
de esta forma podremos hacer algun script que interactue con
este tipo de archivos planos
<%@ Language=VBScript %>
<HTML>
<HEAD>
<TITLE>Lectura de un fichero de texto en ASP</TITLE>
</HEAD>
<BODY>
<P>
<FONT face=Arial size=2 style="BACKGROUND-COLOR: #ffffff"> Volcado del fichero <STRONG>texto.txt </STRONG>... </FONT> </P> <P><FONT face=Arial size=2 style="BACKGROUND-COLOR: #ffffff">
<%
Set objFSO = Server.CreateObject("Scripting.FileSystemObject") // se instancia el Objeto
Set objFile = objFSO.OpenTextFile(Server.MapPath("texto.txt"),1) // Buscamos el Objeto
If Not objFile.AtEndOfStream Then // comprobamos si no es el fin
texto = CStr(objFile.ReadAll)
End If
Response.Write(texto) // Escribimos el Texto
objFile.Close // Cerramos el Archivo Por Seguridad
%>
</FONT> </P>
</BODY>
</HTML>
Mas Articulos
Carrito de Compras en ASP...
Lector de RSS en ASP...
Mostrando Tamaño y fecha de ar...
Usuarios On-line con ASP...
Detectar Info de Navegador con...


