13-jun-2003, 11:21
|
#64 (permalink)
|
Fecha de Ingreso: noviembre-2002
Ubicación: España
Mensajes: 2.366
|
Leer fichero de texto y contar las palabras
<%
'Leer contenido de un fichero de texto en el servidor y contar las palabras
set FSO = Server.CreateObject("Scripting.FileSystemObject")
set oFich = FSO.OpenTextFile(Server.MapPath("prueba.txt"))
texto= replace(oFich.ReadAll,chr(13), " ")
oFich.Close
set oFich = nothing
Archivo = Split(texto," ")
for palabras = 0 to ubound(archivo)
response.write("Linea=" & palabras +1 & " - " & archivo(conta) &"<br>")
next
%>
|
|
|