<% counter_file="counter.txt" Dim fs, file, txt Application.Lock Set fs = Server.CreateObject("Scripting.FileSystemObject") file = Server.MapPath( counter_file ) Set txt = fs.OpenTextFile( file, 1, True ) If Not txt.atEndOfStream Then kjFileCounter = CLng(txt.ReadLine) kjFileCounter = kjFileCounter + 1 txt.Close On Error Resume Next Set txt = fs.CreateTextFile( file, True ) If Err.Number = 70 Then kjFileCounter = "請先將 " & file & " 的唯讀屬性去除!" ElseIf Err.Number <> 0 Then kjFileCounter = Err.Description Else txt.WriteLine kjFileCounter txt.Close End If Application.UnLock %> 笠美科技股份有限公司