|
计数器程序,用application("fso")存放fso=server.createobject("scripting.filesystemobject")错在哪儿啊,程序过不去啊,求指点!!!
global.asa程序如下:
<script language="vbscript" runat="server">
sub application_onstart
set fso=server.createobject("scripting.filesystemobject")
counter_file=server.mappath("counter.txt")
set txtf=fso.opentextfile(counter_file)
application("counter")=txtf.readline
txtf.close
'set application("fso")=fso 就是这儿,
application("counter_file")=counter_file
end sub
sub application_onend
'set fso=application("fso")
counter_file=application("counter_file")
set txtf=fso.createtextfile(counter_file,true)
txtf.writeline(application("counter"))
txtf.close
end sub
</script> |
|