%
'站点计数器
Function imgFileCounter( counter_file )
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
txtFileCounter = CLng(txt.ReadLine)
txtFileCounter = TxtFileCounter + 1
End If
txt.Close
NUMLENGTH=LEN(TxtFileCounter)
FOR I=1 TO numlength STEP 1
response.write " "
NEXT
On Error Resume Next
Set txt = fs.CreateTextFile( file, True )
If Err.Number = 70 Then
txtFileCounter = "请先将文件" & file & "只读属性去除!"
ElseIf Err.Number <> 0 Then
txtFileCounter = Err.Description
Else
txt.WriteLine txtFileCounter
txt.Close
End If
Application.UnLock
End Function
'站点计数器结束
%>