问题 填空题

阅读以下说明,回答下列问题。
[说明]
某论坛的首页及留言页面如图1、图2所示。


图1


图2

在论坛首页中有访客计数器,访客计数存放在系统coun文件夹的counter.txt中,请补充完成下面计数器部分的代码。

<%
dim visitors
______=server.mappath("coun/counter.txt")
set fs=______.createobject("Scripting.FileSystemObject")
set thisfile=fs.opentextfile(whichfile)
visitors=thisfile.______
thisfile.close
countlen=len(visitors)
for i=1 to 5-countlen
response.write"<img src=counter/0.gif>"
next
for i=1 to countlen
response.write"<img src=counter/"&mid(visitors,I,1)&".gif></img>"
next
visitors=______+1
set out=fs.createtextfile(whichfile)
out.writeline(visitots)
out.close
set fs=nothing
%>

A.counter B.server C.request
D.whichfile E.readline F.visitors

答案

参考答案:whichfile
server
readline
visitors

解析:……
<%
dim visitors
whichfile=server.mappath("coun/counter.txt")
set fs=server.createobject ("Scripting.FilesystemObject")
set thisfile=fs.opentextfile(whichfile)
visitors=thisfiie.readline
thisfile.close
countlen=len(visitors)
for i=1 to 5-countlen
response.write" <img src=counter/0.gif>"
next
for i=1 to countlen
response.write"<img src=counter/"&mid(visitors,I,1)&".gif></img>"
next
visitors=visitors+1
set out=fs.createtextfile(whichfile)
out.writeline(visitors)
out.close
set fs=nothing
%>

选择题
单项选择题 A1型题