counter.htm
<a href=counter.asp?save=123&url=http://127.0.0.1/>http://127.0.0.1</a>
共点击次数:<script src=view.asp?save=123></script>
counter.asp
<%
path="d:data"
file=request("save")
url=request("url")
set fs = createobject("scripting.filesystemobject")
if fs.fileexists(path & file & ".txt") then
set thisfile = fs.opentextfile(path & file & ".txt", 1, false)
number=thisfile.readline + 1
thisfile.close
set outfile=fs.createtextfile(path & file & ".txt")
outfile.writeline number
outfile.close
set fs=nothing
else
number=1
set outfile=fs.createtextfile(path & file & ".txt")
outfile.writeline number
outfile.close
set fs=nothing
end if
response.redirect url
%>
view.asp
<%
path="d:data"
file=request("save")
set fs = createobject("scripting.filesystemobject")
if fs.fileexists(path & file & ".txt") then
set thisfile = fs.opentextfile(path & file & ".txt", 1, false)
number=thisfile.readline
thisfile.close
set fs=nothing
else
number=0
end if
response.contenttype = "application/x-javascript"
response.write "document.write(""" & number & """);"
%>
[1]
如对本文有疑问, 点击进行留言回复!!
vscode使用editorconfig插件以及.editorconfig配置文件说明详解
VSCODE添加open with code实现右键打开文件夹
网友评论