1
<%
function AddVisitor()
dim visitors
countfile=server.mappath("count.txt")
Set fs=CreateObject("Scripting.FileSystemObject")
Set thisfile=fs.OpenTextFile(countfile)
visitors=thisfile.readline
thisfile.close
visitors=visitors+1
Set thisfile=fs.CreateTextFile(countfile)
thisfile.WriteLine(visitors)
thisfile.close
set fs=nothing
end function
%>
在当前目录下建立count.txt文件,文件中放任一
数字。
<a href="file.exe" onclick="vbscript:AddVisitor()">下载</a>