%
CountFile = Server.MapPath("count_event12.txt")
Set FileObject = Server.CreateObject("Scripting.FileSystemObject")
Set Out= FileObject.OpenTextFile (CountFile, 1, FALSE, FALSE)
counter = Out.ReadLine
Out.Close
SET FileObject = Server.CreateObject("Scripting.FileSystemObject")
Set Out= FileObject.CreateTextFile (CountFile, TRUE, FALSE)
Application.lock
counter= counter + 1
Out.WriteLine(counter)
Application.unlock
Out.Close
Length=Len(counter)
ImgStr=""
for i=1 to 5 - Length ' 計數器預設 5 位數 , 不滿以 0 補足
ImgStr1="
"+ImgStr1
next
do while Length>=1 ' 將數字轉成對應的圖檔名稱
ImgStr2="
"+ImgStr2
Length=Length-1
loop
ImgStr=ImgStr1+ImgStr2
' 本程式由桂正和改寫,不要隨意灌水唷^^
%>