Search Tools Links Login

aspinfo()

Posted: 2002-06-01
By: ArchiveBot
Viewed: 125

Filed Under:

ASP/ HTML

No attachments for this post


aspinfo() is the equivalent of phpinfo(). It displays all kinds of information about the server, asp, cookies, sessions and several other things in a neat table, properly formatted.

Original Author: Dennis Pallett

Assumptions

You can include my code in any of your pages and call aspinfo() to show the information of your server and asp. However, if you are going to that make sure you remove aspinfo() above Sub aspinfo().

Code

<%
aspinfo()
Sub aspinfo()
Dim strVariable, strASPVersion
Dim strCookie, strKey, strSession
'Retrieve the version of ASP
strASPVersion = ScriptEngine & " Version " & _
ScriptEngineMajorVersion & "." & _
ScriptEngineMinorVersion
%>




aspinfo()







ASP (<%= strASPVersion %>)









Server Variables



<%
For Each strVariable In Request.ServerVariables
Response.write("")
Response.write("")
Response.write("")
Response.write("")
Next 'strVariable
%>
" & strVariable & "" & Request.ServerVariables(strVariable) & " 







Cookies



<%
For Each strCookie In Request.Cookies
If Not Request.Cookies(strCookie).HasKeys Then
Response.write("")
Response.write("")
Response.write("")
Response.write("")
Else
For Each strKey In Request.Cookies(strCookie)
Response.write("")
Response.write("")
Response.write("")
Response.write("")
Next
End If
Next
%>
" & strCookie & "" & Request.Cookies(strCookie) & " 
" & strCookie & "(" & strKey & ")" & Request.Cookies(strCookie)(strKey) & " 







Session Cookies



<%
For Each strSession In Session.Contents
Response.write("")
Response.write("")
Response.write("")
Response.write("")
Next
%>
" & strSession & "" & Session(strSession) & " 







Other variables





Session.sessionid<%= Session.sessionid %>
Server.MapPath<%= Server.MapPath ("/") %>




<%
End Sub
%>


Comments on this post

No comments have been added for this post.

You must be logged in to make a comment.