ASP里面令人震撼地Debug类(VBScript)(3)
end sub
'***********************************************************
'* PrintSummaryInfo
'***********************************************************
Private Sub PrintSummaryInfo(byval DivSetNo)
dim tmp, tbl
tbl = AddRow(tbl, "Time of Request",dbg_RequestTime)
tbl = AddRow(tbl, "Elapsed Time",DateDiff("s", dbg_RequestTime, dbg_FinishTime) & " seconds")
tbl = AddRow(tbl, "Request Type",Request.ServerVariables("REQUEST_METHOD"))
tbl = AddRow(tbl, "Status Code",Response.Status)
tbl = AddRow(tbl, "Script Engine",ScriptEngine & " " & ScriptEngineMajorVersion & "." & ScriptEngineMinorVersion & "." & ScriptEngineBuildVersion)
tbl = MakeTable(tbl)
tmp = replace(replace(replace(DivSets(DivSetNo),"#sectname#","SUMMARY"),"#title#","SUMMARY INFO"),"#data#",tbl)
Response.Write replace(tmp,"|", vbcrlf)
End Sub
'***********************************************************
''@SDESCRIPTION: Adds the Database-connection object to the debug-instance. To display Database-information
''@PARAM: - oSQLDB [object]: connection-object
'***********************************************************
Public Sub GrabDatabaseInfo(byval oSQLDB)
dbg_DB_Data = AddRow(dbg_DB_Data, "ADO Ver",oSQLDB.Version)
dbg_DB_Data = AddRow(dbg_DB_Data, "OLEDB Ver",oSQLDB.Properties("OLE DB Version"))
dbg_DB_Data = AddRow(dbg_DB_Data, "DBMS",oSQLDB.Properties("DBMS Name") & " Ver: " & oSQLDB.Properties("DBMS Version"))
dbg_DB_Data = AddRow(dbg_DB_Data, "Provider",oSQLDB.Properties("Provider Name") & " Ver: " & oSQLDB.Properties("Provider Version"))
End Sub
'***********************************************************
'* PrintDatabaseInfo
'***********************************************************
Private Sub PrintDatabaseInfo(byval DivSetNo)
dim tbl
tbl = MakeTable(dbg_DB_Data)
tbl = replace(replace(replace(DivSets(DivSetNo),"#sectname#","DATABASE"),"#title#","DATABASE INFO"),"#data#",tbl)
Response.Write replace(tbl,"|", vbcrlf)
End Sub
'***********************************************************
'* PrintCollection
'***********************************************************
Private Sub PrintCollection(Byval Name, ByVal Collection, ByVal DivSetNo, ByVal ExtraInfo)
Dim vItem, tbl, Temp
For Each vItem In Collection
if isobject(Collection(vItem)) and Name <> "SERVER VARIABLES" and Name <> "QUERYSTRING" and Name <> "FORM" then
tbl = AddRow(tbl, vItem, "{object}")
elseif isnull(Collection(vItem)) then
tbl = AddRow(tbl, vItem, "{null}")
elseif isarray(Collection(vItem)) then
tbl = AddRow(tbl, vItem, "{array}")
else
if dbg_AllVars then
tbl = AddRow(tbl, "<nobr>" & vItem & "</nobr>", server.HTMLEncode(Collection(vItem)))
内容版权声明:除非注明,否则皆为本站原创文章。