⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 0149.htm

📁 asp教程宝典``还不错
💻 HTM
字号:
<html>

<head>
<title>新时代软件教程:操作系统 主页制作 服务器 设计软件 网络技术 编程语言 文字编辑</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style>
<!--
body, table {font-size: 9pt; font-family: 宋体}
a {text-decoration:none}
a:hover {color: red;text-decoration:underline}
.1  {background-color: rgb(245,245,245)}
-->
</style>
</head>
<p align="center"><script src="../../1.js"></script></a>
    <p align="center"><big><strong>不用ASP图像组件来生成图像的ASP计数器程序(一)</strong></big></p>

<div align="right">---(文/qianfengyun)</div>

<pre>
不用ASP图像组件来生成图像的ASP计数器程序这是我去年编的一个ASP程序,那时用惯了C语言,
所以对Basic反而忘了,但由于觉得ASP很热门,所以试着编了这个程序,程序没经过优化,代
码很长,主要是数据那时候不知道该怎么用:) 别笑我,因为现在我会用啦!!
这是个简单的计数器申请系统,采用文本,所以只要是支持ASP的空间就都可以测试!!
其中TXT目录放的是所有人的计数文本文件
number是用来统计当前申请计数器的最大人数 初始化内容为0
apply.asp applycheck.asp是用来提供申请计数器的
header 是我用C语言从一个256色的bmp图像中提取出来的bmp图像的头部信息,太大了,有时间
的人可以改为2色的bmp图像的头部信息,当然代码改变了。我取为256色只是为了方便编制下面
的counter.asp
counter.asp 当然是计数器的核心程序啦!!
里面还有一个counter.txt 时隔久了,不知有没有用,反正我也把它放上去嘛算啦!!


ZIP下载地方:
http://grwy.online.ha.cn/explorer

下面只例举出来几个ASP程序的源程序:
--------------apply.asp----------------
&lt;%set fsFilesys=CreateObject("Scripting.FileSystemObject")
set myText=fsFilesys.OpenTextFile(Server.MapPath("/explorer/")&"/counter/number.txt")
counter=mytext.readline
mytext.close
counter=counter+1
user=counter
%>
&lt;html>

&lt;head>
&lt;title>&lt;/title>
&lt;style type="text/css">&lt;!--
.p9 {  font-family: "宋体"; font-size: 9pt}a        {text-transform: none; 
text-decoration: none;}
a:hover {text-decoration: underline; color: #002255;}
-->&lt;/style>
&lt;/head>

&lt;body bgcolor="#FFE0D7">

&lt;table border="1" cellspacing="0" cellpadding="0" bgcolor="#0E3700">
  &lt;tr bgcolor="#EEF9FF">
    &lt;td valign="middle" align="center" bgcolor="#FFFCD2" width="694">
    &lt;span class="p9">&lt;font
    color="#1F9B00">&lt;a href="../../index.html" target="_blank">网站主页
    &lt;/a> &lt;/font>&lt;/span>&lt;/td>
    &lt;td valign="middle" align="center" bgcolor="#FFFCD2" width="694">
    &lt;span class="p9">&lt;font
    color="#1F9B00">&lt;a href="../../zdlink/zdjx.htm" target="_blank">网站精选
    &lt;/a> &lt;/font>&lt;/span>&lt;/td>
    &lt;td valign="middle" align="center" bgcolor="#FFFCD2" width="694">
    &lt;span class="p9">&lt;font
    color="#1F9B00">&lt;a href="../../program/bcyd111.htm" target="_blank">编程圆地
    &lt;/a> &lt;/font>&lt;/span>&lt;/td>
    &lt;td valign="middle" align="center" bgcolor="#FFFCD2" width="694">
    &lt;span class="p9">&lt;font
    color="#1F9B00">&lt;a href="../../zypic/zyfg.htm" target="_blank">中雁风光
    &lt;/a> &lt;/font>&lt;/span>&lt;/td>
    &lt;td valign="middle" align="center" bgcolor="#FFFCD2" width="694">
    &lt;span class="p9">&lt;font
    color="#1F9B00">&lt;a href="../../downfile/ljxz.htm" target="_blank">软件下载
    &lt;/a> &lt;/font>&lt;/span>&lt;/td>
    &lt;td align="center" bgcolor="#FFFCD2" width="695">&lt;p align="center">
    &lt;span class="p9">&lt;font
    color="#1F9B00">&lt;a href="http://grwy.online.ha.cn/explorer/diablo2/diablo.htm"
    target="_blank">暗黑帝国&lt;/a> &lt;/font>&lt;/span>&lt;/td>
    &lt;td align="center" bgcolor="#FFFCD2" width="695">&lt;p align="center">
    &lt;span class="p9">&lt;font
    color="#1F9B00">&lt;a href="../../myworld/myworld.htm" target="_blank">我的天地
    &lt;/a> &lt;/font>&lt;/span>&lt;/td>
    &lt;td align="center" bgcolor="#FFFCD2" width="695">&lt;p align="center">
    &lt;span class="p9">&lt;font
    color="#1F9B00">&lt;a href="../../nomoneysource/mfzy.htm" target="_blank">免费资源
    &lt;/a> &lt;/font>&lt;/span>&lt;/td>
    &lt;td align="center" bgcolor="#FFFCD2" >&lt;span class="p9">&lt;font color="#1F9B00">
    &lt;/font>&lt;/span>&lt;font
    size="4">&lt;img src="http://counter.hongzhi.com/cgi-bin/Count.exe?df=3079" width="53"
    height="12" align="absmiddle">&lt;/font>&lt;span class="p9">&lt;font color="#1F9B00">
    &lt;/font>&lt;/span>&lt;/td>
  &lt;/tr>
&lt;/table>

&lt;p align="center">&lt;span class="p9">&lt;br>
&lt;/span>&lt;/p>

&lt;p align="center"> &lt;/p>
&lt;div align="center">&lt;center>

&lt;table>
  &lt;tr>
    &lt;td>&lt;span class="p9">&lt;font color="#0080C0">&lt;strong>&lt;big>探索者免
    费计数器申请&lt;/big>&lt;/strong>&lt;/font>&lt;/span>&lt;/td>
  &lt;/tr>
  &lt;tr>
    &lt;td >&lt;form name="apply" action="applaycheck.asp?user=&lt;%=counter%>" 
    method="POST">&lt;span class="p9">
    &lt;br>你是第&lt;%=counter%>位来本站申请计数器的人,欢迎你!
&lt;/span>
      &lt;span class="p9">&lt;br>三项都是是必填项&lt;/span>&lt;br>&lt;br>
&lt;span class="p9">你的用户名是:&lt;%=counter%>&lt;BR>点击开始申请就会得到一段代码,
&lt;br>加入你的页面就可开始统计了。
     &lt;/span>
       &lt;p align="center">&lt;span class="p9">&lt;input type="submit" 
       value="开始申请" class="p9">&lt;/p>
    &lt;/form>
    &lt;/td>
  &lt;/tr>
&lt;/table>
&lt;/center>&lt;/div>

&lt;/body>
&lt;/html>

------------applycheck.asp---------------------
&lt;style type="text/css">&lt;!--
.p9 {  font-family: "宋体"; font-size: 9pt}a        {text-transform: none; 
text-decoration: none;}
a:hover {text-decoration: underline; color: #002255;}
-->&lt;/style>
&lt;/head>
&lt;body>
&lt;span class="p9">
&lt;%user=request.querystring("user")%>
&lt;%set fsFilesys=CreateObject("Scripting.FileSystemObject")
set myText=fsFilesys.OpenTextFile(Server.MapPath("/explorer/")&"/counter/number.txt")
counter=myText.ReadLine
counter=counter+1
myText.close
set myText=fsFilesys.CreateTextFile(Server.MapPath("/explorer/")&"/counter/number.txt",true)
mytext.writeline(counter)
mytext.close%>

你的计数器申请成功!只要将以下代码加入你的页面,就能在你的页面得到一个计数器:
&lt;br>&lt;br>
&lt;font color="#ff0000">
&lt;p>&lt;a href=&quot;http://grwy.online.ha.cn/explorer&quot;&gt;&lt;img 
src=&quot;http://home.lz.gs.cninfo.net/explorer/counter/counter.asp?user=
&lt;%=user%>&quot;&lt;br>
border=&quot;0&quot; alt=&quot;探索者计数器&quot; width=&quot;64&quot; 
height=&quot;16&quot;&gt;&lt;/a&gt;&lt;/p>

&lt;/span>
&lt;a href="http://grwy.online.ha.cn/explorer">&lt;img 
src="http://-2/explorer/counter/counter.asp?user=&lt;%=user%>"
border="0" alt="探索者计数器" width="64" height="16">&lt;/a>

&lt;%set myText=fsFilesys.CreateTextFile(Server.MapPath("/explorer/")&"/counter/txt/"
&user&".ddd",true)
myText.writeline("0")
mytext.close%>
&lt;/body>
</pre>

  </table>
<p align="center"><script src="../../2.js"></script></a>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -