Write simple daily traffic with ASP, maximum day flow statistics

zhaozj2021-02-17  56

Write simple daily traffic with ASP, maximum day flow statistics ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------- <% '######## # - Statistics Today's traffic, maximum day traffic - ######### Sub my_today_counter () day1 = cstr (Date ()) '##### - Get the current date DAY_COUNTER_FILE = Server.MAppath (" Counter / day_counter.ini ") '###### - Specify counter file set fo = server.createObject (" scripting.filesystemObject ") set get_old = fo.opentextFile (day_counter_file, 1, false, false' ### ### - read record file day2 = get_old.ReadLine Today_Counter = get_old.ReadLine get_old.close Application ( "Todays") = Today_Counter Set out = fo.CreaTetextFile (Day_Counter_File, true, false) if day1 = day2 then '## ##### - Write today's traffic out.writeline (day2) today_counter = Today_Counter 1 out.writeline (Today_Counter) Out.close Else '##### - New day, summarize the maximum day traffic max_day_counter_file = Server . mappath ("counter / max_day_counter.ini") set outmax = fo.opentextfile (max_day_counter_file, 1, false, false) day3 = OUT Max.readline maxdaycounter = outmax.readline '###### - Read the maximum flow of traffic record Outmax.close Application ("maxday" = maxdaycounter' ###### - Maximum traffic if today_counter-maxdaycounter> 0 The flow rate is greater than the maximum day traffic record Application ("maxday" = Today_Counter '###### - Maximum flow set outmax = fo.createtextfile (max_day_counter_file, true, false Outmax. WriteLine (day2) '###### - If DAY2 has the maximum day traffic Outmax.WriteLine (Today_Counter)'

转载请注明原文地址:https://www.9cbs.com/read-30308.html

New Post(0)