您现在的位置:计算机技术学习网 > 技术中心 > WEB编程 > ASP >

网络精英计数器源程序

来源:网络 责任编辑:栏目编辑 发表时间:2013-07-01 08:48 点击:
使用了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.asp,然后在与count.asp,然后通过下面代码引用本计数器:

    相关新闻>>

      发表评论
      请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
      用户名: 验证码:点击我更换图片
      最新评论 更多>>

      推荐热点

      • WAP常见问题问答大全(四)
      • ASP开发必备:WEB打印代码大全
      • ASP调用系统ping命令
      • asp缓存技术
      • ASP教程:第三篇 ASP基础
      • 用ASP+XML打造留言本(4)
      • 关于ASP Recordset 分页出现负数解决方法及建议
      • 用asp怎样编写文档搜索页面(5)
      • ASP处理多关键词查询实例代码
      网站首页 - 友情链接 - 网站地图 - TAG标签 - RSS订阅 - 内容搜索
      Copyright © 2008-2015 计算机技术学习交流网. 版权所有

      豫ICP备11007008号-1