<% Function rstj() dim fso,f1,ts,s,textarea,file_path file_path="counter/" textarea=Trim(Request.QueryString("textarea")) fn="*|'|&|and|or|not|%" fn_split=split(fn,"|") for i=0 to ubound(fn_split) textarea=Replace(textarea,fn_split(i),"") next 'Response.write file_path&textarea&".txt" Const ForReading=1 Set fso=CreateObject("Scripting.FileSystemObject") Set ts=fso.OpenTextFile(Server.MapPath(file_path&textarea&".txt"),ForReading,true,-2) If Not ts.atEndOfStream Then s=ts.Readline ts.close set fso=createobject("scripting.filesystemobject") set f1=fso.createtextfile(server.mappath(file_path&textarea&".txt"),true,true) f1.writeline s+1 f1.close Set ts=fso.OpenTextFile(Server.MapPath(file_path&textarea&".txt"),ForReading,true,-2) s=ts.Readline rstj=s ts.close else set f1=fso.createtextfile(server.mappath(file_path&textarea&".txt"),true,true) f1.writeline 126 f1.close rstj=126 End If End Function Response.write "
ÄúÊǵÚ"&rstj&"λ·Ã¿Í
" %>