有没有帮我看看这个问题,网页提示缺少end
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%><%
function readcounter(textfile)'这个读取counter
dim fso,ts
set fso = server.createobject("scripting.filesystemobject")
set ts = fso.opentextfile(server.mappath(textfile),1,true)
if not ts.atendofstream then
readcounter=clng(ts.readline)
else
readcounter=10
end if
ts.close
set ts=nothing
set fso=nothing
end function
sub writecounter(textfile,counter)'这个写入counter
dim fso,ts
set fso = server.createobject("scripting.filesystemobject")
set ts = fso.opentextfile(server.mappath(textfile),2,true)
application.lock
counter=counter+1
application.unlock
ts.writeline(counter)
ts.close
set ts=nothing
set fso=nothing
end sub
counterxin=readcounter("xin.txt")
counterhua=readcounter("hua.txt") '得到相应点击的图片文件里记得counter
if request("leibie")="hua" then'如果是花的话就写入花相应的counter文件,只有这一个的时候不出问题,但是在有其他的判断的时候总是提示缺少end
call writecounter("\www\asp_text\application\hua.txt",counterhua)
else if request("leibie")="xin" then
call writecounter("\www\asp_text\application\xin.txt",counterxin)
end if
%>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>明星投票系统</title>
<style>
* { margin:0; padding:0; }
body { font-size:12px; color:#99CC33; background-color:#FFCCCC; font-family:Arial, Helvetica, sans-serif; }
#image { width:445px; margin:5px auto; background-color:#99FFFF; }
#image dl { background-color:#CCFFFF; float:left; margin:5px; }
#image dl dt { margin:0 auto; }
#image dl dt img { width:80px; height:80px; display:block; margin:2px auto; }
#image dl dt a img { border:0; }
#image dl dd { background-color:#CC66CC; line-height:20px; text-align:center; }
#image dl dd p { font-size:14px; color:#FFFFFF; }
#image dl dd p span { background-color:#CC3300; margin:auto 2px; }
</style>
</head>
<body>
<div id="image">
<dl>
<dt><a href="star.asp?leibie=xin" ><img src="image/xin.png"></a></dt>
<dd><p>心:<span>
<%=readcounter("\www\asp_text\application\xin.txt")%></span>票</p></dd>
</dl>
<dl>
<dt><a href="star.asp?leibie=hua" ><img src="image/hua.png"></a></dt>
<dd><p>花:<span>
<%=readcounter("\www\asp_text\application\hua.txt") %></span>票</p></dd>
</dl>
<dl>
<dt><a href="star.asp?leibie=hudie" ><img src="image/hudie.png"></a></dt>
<dd><p>蝴蝶:<span>
<%=readcounter("\www\asp_text\application\hudie.txt")%></span>票</p></dd>
</dl>
<dl>
<dt><a href="star.asp?leibie=jita" ><img src="image/jita.png"></a></dt>
<dd><p>吉他:<span>
<%=readcounter("\www\asp_text\application\jita.txt")%></span>票</p></dd>
</dl>
</div>
</body>
</html>