当前位置导航:炫浪网>>网络学院>>网页制作>>ASP教程

LINE 的计数器源程序(附源代码)

  <%
bUseImages = CBool(Request.QueryString("images"))
strCountFileName = Server.MapPath(Request.ServerVariables("SCRIPT_NAME") & ".dat")
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
' Open the file as a text stream (1 = ForReading, True = Create)
Set objCountFile = objFSO.OpenTextFile(strCountFileName, 1, True)
If Not objCountFile.AtEndOfStream Then
iCount = CLng(objCountFile.ReadAll)
Else
iCount = 0
End If
objCountFile.Close
Set objCountFile = Nothing
iCount = iCount + 1
Set objCountFile = objFSO.CreateTextFile(strCountFileName, True)
objCountFile.Write iCount
objCountFile.Close
Set objCountFile = Nothing
Set objFSO = Nothing
If bUseImages Then
For I = 1 to Len(iCount)
Response.Write "<IMG SRC=""./images/digit_"
Response.Write Mid(iCount, I, 1)
Response.Write ".gif?http://www.xvna.com"" ALT="""
Response.Write Mid(iCount, I, 1)
Response.Write """ width=20 height=27>"
Next
Else
Response.Write iCount
End If
%>


 
相关内容
赞助商链接