查看: 2883|回复: 0

[问与答] 高手帮我看看吧,这个global.asa计数器错在哪?

[复制链接]
哈哈将军 发表于 2017-1-11 23:43:36 | 显示全部楼层 |阅读模式
计数器程序,用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>
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表

在线客服

售前咨询
售后咨询
服务热线
023-58418553
微信公众号