
02/07/2002, 09:06
|
 | | | Fecha de Ingreso: julio-2001 Ubicación: En algun lugar de un gran pais
Mensajes: 418
Antigüedad: 23 años, 10 meses Puntos: 0 | |
Re: Puedo usar ASP en txt? Claro que se puede puede podrías hacer algo asi:
<%
Dim fso, tsm, value
Set fso = Server.CreateObject("Scripting.FileSystemObje ct")
Set tsm = fso.OpenTextFile (Server.MapPath("../tudirectorio/counter.txt"),1,false)
value = Trim(tsm.ReadLine)
tsm.Close
If Not Session("counter") Then
value = value + 1
Session("counter") = true
Set tsm = fso.CreateTextFile (Server.MapPath("../tudirectorio/counter.txt"),true)
tsm.WriteLine(value)
tsm.Close
End If
Set tsm = Nothing
Set fso = Nothing
%>
ten en cuenta que donde pongas el archivo de texto debe haber permisos de lectura/escritura porque si no no se puede escribir en el archivo.
saludos y suerte
PD: este código lo pones donde quieres que aparezca el contador
<% Response.Write (value)%>
<img src="http://www.efrance.fr/masterASPx/firma.jpg" width="465" height="79" border="0" usemap="#URL">
<map name="URL">
<area shape="rect" coords="270,48,347,61" href="http://www.efrance.fr/masteraspx" target="_blank">
</map> |