<% set bobj = Application("bobj") p=Request("p") ctrname=Request("ctr") if len(ctrname) > 0 then Application.Lock() file=Server.MapPath ("/counter") & "\" & ctrname & ".txt" Set FileObject = Server.CreateObject("Scripting.FileSystemObject") On error resume next Set inx = FileObject.OpenTextFile(file) Count = inx.ReadLine inx.Close ' ファイルのクローズ Count = Count + 1 ' カウンタのインクリメント Set outx = FileObject.CreateTextFile(file,True) outx.WriteLine Count outx.Close ' ファイルのクローズ Application.UnLock() end if Response.Expires=0 Response.Buffer=TRUE Response.Clear Response.ContentType ="image/gif" Response.BinaryWrite bobj.Counter(p,Count) Response.End %>