各位高手我的global.asa的内容如下,现在启动服务器时可以正确读取count.txt里记录的数字,可是关闭或重启服务器时却不能写入count.txt,百思不得其解,请各位高手帮我想想问题可能出在哪里。
<Script language="VBScript" RunAt="Server">
    Sub Application_OnStart    
    countFile = server.mapPath("/")&"\"&"count.txt"
    set fso = Server.CreateObject("Scripting.FileSystemObject")
    set file = fso.OpenTextFile(countFile)
    Application("number") = file.readLine
    file.close
    set file = nothing
    set fso = nothing        
    End Sub
    Sub Application_OnEnd
    logFileName = server.mapPath("/")&"\"&"count.txt"
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set logFile = fs.opentextfile(logFileName , 2, True)
    logFile.writeline (Application("number"))
    logFile.Close
    set logFile=nothing
    Set fs = Nothing
    End Sub
</Script>



											
	    

	
											
