<% whichfile=server.mappath("info.txt") Set fso = CreateObject("Scripting.FileSystemObject") Set MyFile = fso.CreateTextFile(whichfile,True) MyFile.WriteLine("My Name Is CN-Bruce") MyFile.WriteLine("My Sex Is Male") MyFile.Close %> <a href="opentxt.asp">查看内容</a>
set fso=createobject("Scripting.FileSystemObject") set openfile=fso.opentextfile(whichfile,1) visitors=openfile.readline openfile.close CountLen=len(visitors) response.write "您是本页的第"
for i=1 to 6-countLen '表示最大值999999 response.write "<img src=img/0.gif></img>" next for i=1 to countlen response.write "<img src=img/" & mid(visitors,i,1) & ".gif></img>" next response.write "位访客"
visitors=visitors+1 set creatfile=fso.createtextfile(whichfile) creatfile.writeLine(visitors) creatfile.close set fso=nothing %>