Articulos

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>&nbsp;</P>

</BODY>
</HTML>




Your Ad Here '




codigolandia.com ©2007 Barranquilla - Colombia
Creative Commons License
web counter Directorio de Información

Esta obra está bajo una licencia de Creative Commons Xataka < Motigo Webstats - Web site estadísticas gratuito El contador para sitios web particulares
Colabora