|
|
|
|
±è°æÈÆ / 2001-05-09 / ¿ÀÈÄ 10:22:44 / 211.191.209.22
Á¶È¸¼ö : 157
|
[Áú¹®] global.asa ¿¡ °üÇؼ ±Ã±ÝÇÑ Á¡ÀÌ ÀÖ½À´Ï´Ù. |
¾Æ·¡ÀÇ ÆÄÀÏÀº global.asaÆÄÀÏÀÔ´Ï´Ù.
¹æ¹®ÀÚ°¡ »çÀÌÆ®¿¡ ¸î¹ø° ¹æ¹®Çß´ÂÁö ¾Ë¾Æº¸·Á°í ÇÏ´Â °ÍÀÔ´Ï´Ù. ±×·±µ¥, ¸Â´ÂÁö Ʋ¸°Áö¸¦ ¸ð¸£°Ú½À´Ï´Ù.
º¸½Ã°í Ʋ¸° ºÎºÐÀÌ ÀÖÀ¸¸é °íÃļ Á» °¡¸£ÃÄ ÁÖ¼¼¿ëºÎŹµå¸³´Ï´Ù.
Sub Application_OnStart
Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8
Dim strFile
strFile = "d:\asp\visit\visit.txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strFile, ForReading)
VisitFile = objFile.Readline
Application("visit") = VisitFile
Application("user") = 0
objFile.Close
End Sub
Sub Application_OnEnd
End Sub
Sub Session_OnStart
Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8
Dim strFile
strFile = "d:\asp\visit\visit.txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strFile, ForWriting)
Application.Lock
Application("visit") = Application("visit") + 1
intVisit = Application("visit")
Application.Unlock
Session("visitcount") = intVisit
Application.Lock
Application("user") = Application("user") + 1
intUser = Application("user")
Application.Unlock
objFile.WriteLine
intVisit objFile.Close
End Sub
Sub Session_OnEnd
Application.Lock
Application("user") = Application("user") - 1
Application.Unlock
End Sub
objFile.Close
º¸½Å´Ù±¸ ¼ö°íÇϼ̽À´Ï´Ù.
ºü¸¥ ´äº¯Sub Application_OnStart
Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8
Dim strFile
strFile = "d:\asp\visit\visit.txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strFile, ForReading)
VisitFile = objFile.Readline
Application("visit") = VisitFile
Application("user") = 0
objFile.Close
End Sub
Sub Application_OnEnd
End Sub
Sub Session_OnStart
Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8
Dim strFile
strFile = "d:\asp\visit\visit.txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strFile, ForWriting)
Application.Lock
Application("visit") = Application("visit") + 1
intVisit = Application("visit")
Application.Unlock
Session("visitcount") = intVisit
Application.Lock
Application("user") = Application("user") + 1
intUser = Application("user")
Application.Unlock
objFile.WriteLine
intVisit objFile.Close
End Sub
Sub Session_OnEnd
Application.Lock
Application("user") = Application("user") - 1
Application.Unlock
End Sub
objFile.Close
º¸½Å´Ù±¸ ¼ö°íÇϼ̽À´Ï´Ù.
ºü¸¥ ´äº¯ ºÎŹ µå¸³´Ï´Ù.
|
|
|
|