¾È±Ô °øºÎ¹æ

ACTIVE SERVER PAGE > Global.asa

µî·ÏÀÏ : 2017-07-04 18:25 Á¶È¸¼ö : 52,459

 
<script language="VBScript" runat="Server"> 
	
	  Sub Application_OnStart 
		Set FileObject = Server.CreateObject("Scripting.FileSystemObject") 
		VisitCountFileName = "c:\inetpub\wwwroot\client\21pol\visitnum\visit.txt" 
		Set Out = FileObject.OpenTextFile(VisitCountFileName,1,FALSE,FALSE) 
		Application("visit")=Out.ReadLine 
		Application("VisitCountFileName")=VisitCountFileName 
		application("now_visit") = 0 
	  End Sub 
	
	  Sub Application_OnEnd 
		Set FileObject = Server.CreateObject("Scripting.FileSystemObject") 
		Set Out = FileObject.CreateTextFile(Application("VisitCountFileName"),TRUE,FALSE) 
		Application.Lock Out.WriteLine(Application("visit")) 
		Application.UnLock 
	  End sub Sub 
	
	  Session_OnStart 
		Application.lock 
		Application("visit")= Application("visit")+1 
		Application("now_visit")= Application("now_visit")+1 
		Application.unlock 
	
		Session.Timeout =20 
	
		If Application("visit") MOD 1 = 0 Then 
			Set FileObject = Server.CreateObject("Scripting.FileSystemObject") 
			Set Out = FileObject.CreateTextFile(Application("VisitCountFileName"),TRUE,FALSE) 
			Application.lock Out.WriteLine(Application("visit")) 
			Application.unlock 
		End If 
	  End Sub 
	
	  Sub Session_OnEnd 
		Application.lock 
		Application("now_visit")= Application("now_visit")-1 
		Application.unlock 
	  End Sub 
	
	  </script> 



 
¡Ø Ȥ½Ã µµ¿òÀÌ µÇ¼Ì´Ù¸é ´ñ±Û¿¡ ÇѸ¶µð ³²°ÜÁÖ¼¼¿ä!
ÀÛ¼ºÀÚ   ºñ¹Ð¹øÈ£
ÀÚµ¿±Û ¹æÁö     (ÀÚµ¿±Û ¹æÁö ±â´ÉÀÔ´Ï´Ù.)
³»¿ë   ´ñ±Û´Þ±â 
À̸ÞÀÏ ¹®ÀÇ : cak0280@nate.com  
Copyright 2000 By ENTERSOFT.KR All Rights Reserved.