<%
dim fso,f,no,i '定义变量绝对是个好习惯
set fso = createobject("scripting.filesystemobject") '建立对象的实例
set f = fso.opentextfile(server.mappath("count.no"), 1, true) '建立文本文件,打开为只读.
if f.atendofstream then '判断这个文件是否不存在
no=1
else
no=f.readline
no=no+1
end if
f.close
set f=fso.opentextfile(server.mappath("count.no"),2,true) '准备写
f.write(no) '写入
f.close
'改进标志1
no=cstr(no) '整齐数字
for i=1 to 5-len(no)
no="0"&no
next
%>
<font color=white size=3pt>你是第<font color=red><%=no%></font>个来客</font>
Java Asp PHP .Net XML C/C++ CGI VB Jsp J2ee J2se J2me EJB Servlet Tomcat Resin Struts Weblogic Eclipse ANT GUI JMS Web servise IDEA Webphere Hibernate Spring Jboss Applet Swing Socket Javamail Perl Ajax P2P 安全 模式 框架 测试 开源 游戏
Windows XP Windows 2000 Windows 2003 Windows Me Windows 9.x Linux UNIX 注册表 操作系统 服务器 应用服务器