Recomendado: ASP Simple Text Counter %Set fs = createObject (scripting.fileSystemObject) wfile = server.mappath () cgi-binwww.111cn.cn/asp/asp.html.txt en el resumen de error siguiente set a = fs.opentextfile (wfile) hits = acLNG (a.ladline) hits + 1 a. 1 a.clase luego entonces el error de error = 1 final = 1 final = 1 final = 1 final AT = 1 fin.
Echemos un vistazo al tutorial de ejemplo a continuación.
Echemos un vistazo a la página enviada:
<Form Action = SaveInfo.asp Method = Post>
<!-tus campos aquí->
<Entrada tipo = enviar value = enviar>
</form>
Echemos un vistazo a la página que recibe datos y los guarda.
<%
Establecer fs = createObject (scripting.filesystemObject)
FolderPath = server.mappath () & /CGI-bin /Messages143718
Wcounter = folderPath &/Counter.txt
Establecer fs = createObject (scripting.filesystemObject)
Si fs.folderexists (carpeta) entonces
Establecer a = fs.opeNextFile (wcounter)
Hits = CLNG (A.Readline)
Hits = Hits + 1
A. Close
demás
Establecer a = fs.CreateFolder (FolderPath)
Hits = 1
final si
Establecer a = fs.CreateTextFile (wcounter, verdadero)
A.WriteLine (éxitos)
A. Close
Establecer fs = nada
Establecer fs = createObject (scripting.filesystemObject)
Establecer a = fs.CreateTextFile (FolderPath & & Hits & .txt)
Para cada x en solicitud. Forma
A.WriteLine (x &: & request.form (x))
Próximo
A. Close
Establecer a = nada
Establecer fs = nada
%>
Compartir: Código de estadísticas de usuario en línea de ASP en línea Simplemente copie la tabla de código en un archivo de texto y guárdelo en el sitio web (/global.asa) en el directorio de inicio. Script Language = VBScript runat = Server Sub Application_onStart Application (ActiveVisitors) = 0 End Sub Application_onend End subsission_onstart Application.lock AP