当前位置: 移动技术网 > IT编程>开发语言>.net > 网络精英计数器源程序

网络精英计数器源程序

2019年01月13日  | 移动技术网IT编程  | 我要评论

智能家具,节能金点子,ca1121航班

使用了imagelib!
     <%
     site_id=request.querystring("site_id")
     if isempty(site_id) then
     response.end
     end if
     
     set sistema = createobject("scripting.filesystemobject")
     set ilib = server.createobject("overpower.imagelib")
     path=server.mappath("../保存计数文件的路径/")
     counterfile=path & "count_"& site_id &".txt"
     contagem = 0
     if sistema.fileexists(counterfile) then
     set arquivo = sistema.getfile(counterfile)
     set texto = arquivo.openastextstream(1, -2)
     contagem = texto.readline
     texto.close
     end if
     contagem = contagem + 1
     
     set texto = sistema.createtextfile(counterfile, true, false)
     texto.writeline contagem
     texto.close
     
     texto = contagem
     if contagem > 1 then texto = texto
     textolen=len(texto)
     for i=1 to 8-textolen
     texto="0" & texto
     next
     
     ilib.fontcolor = "#00ff00" 字体色
     ilib.brushcolor = "#000000" 背景色
     ilib.fontface = "verdana"
     ilib.fontface = "checkers"
     ilib.fontsize = 8
     ilib.fontbold = false
     ilib.width = ilib.gettextwidth(texto)+5
     ilib.height = ilib.gettextheight(texto)+5
     ilib.pencolor = "#307c3b" 边框色
     ilib.box 1,1,ilib.width,ilib.height
     ilib.textout texto,3,3
     
     ilib.textout "",ilib.width/2 - tamanho/2,10
     
     ilib.picturebinarywrite 2, 0, ""
     
     set sistema =nothing
     set ilib =nothing
     set arquivo = nothing
     set texto = nothing
     %>
     本计数器使用了imagelib组件,在使用程序前需要先注册该组件;
     假如说你将文件保存为count.,然后在与count.asp,然后通过下面代码引用本计数器:

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网