![]() |
|
|
+ Search |
![]()
|
Feb 27th, 2003 05:09
Sachin P, dewa m widyakumara,
<%
aspinfo()
Sub aspinfo()
Dim strVariable, strASPVersion
Dim strCookie, strKey, strSession
'Retrieve the version of ASP
strASPVersion = ScriptEngine & " Version " & _
ScriptEngineMajorVersion & "." & _
ScriptEngineMinorVersion
%>
<HTML>
<HEAD>
<style type="text/css"><!--
a { text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-family: arial, helvetica, sans-serif; font-size: 18pt;
font-weight: bold;}
h2 { font-family: arial, helvetica, sans-serif; font-size: 14pt;
font-weight: bold;}
body, td { font-family: arial, helvetica, sans-serif; font-size:
10pt; }
th { font-family: arial, helvetica, sans-serif; font-size: 10pt;
font-weight: bold; }
//--></style>
<TITLE>aspinfo()</TITLE></HEAD>
<BODY>
<DIV align="center">
<TABLE width="80%" border="0" bgcolor="#000000" cellspacing="1"
cellpadding="3">
<TR>
<TD align="center" valign="top" bgcolor="#FFFFAE" align="left"
colspan="2">
<H3>ASP (<%= strASPVersion %>)</H3>
</TD>
</TR>
</TABLE>
<BR>
<HR>
<BR>
<H3>Server Variables</H3>
<TABLE width="80%" border="0" bgcolor="#000000" cellspacing="1"
cellpadding="3">
<%
For Each strVariable In Request.ServerVariables
Response.write("<TR>")
Response.write("<TH width=""30%"" bgcolor=""#FFFFAE""
align=""left"">" & strVariable & "</TH>")
Response.write("<TD bgcolor=""#FFFFD9"" align=""left"">" &
Request.ServerVariables(strVariable) & " </TD>")
Response.write("</TR>")
Next 'strVariable
%>
</TABLE>
<BR>
<HR>
<BR>
<H3>Cookies</H3>
<TABLE width="80%" border="0" bgcolor="#000000" cellspacing="1"
cellpadding="3">
<%
For Each strCookie In Request.Cookies
if Not Request.Cookies(strCookie).HasKeys Then
Response.write("<TR>")
Response.write("<TH width=""30%"" bgcolor=""#FFFFAE""
align=""left"">" & strCookie & "</TH>")
Response.write("<TD bgcolor=""#FFFFD9""
align=""left"">" & Request.Cookies(strCookie) & " </TD>")
Response.write("</TR>")
Else
For Each strKey In Request.Cookies(strCookie)
Response.write("<TR>")
Response.write("<TH width=""30%""
bgcolor=""#FFFFAE"" align=""left"">" & strCookie & "(" & strKey & ")
</TH>")
Response.write("<TD bgcolor=""#FFFFD9""
align=""left"">" & Request.Cookies(strCookie)(strKey) & " </TD>")
Response.write("</TR>")
Next
End if
Next
%>
</TABLE>
<BR>
<HR>
<BR>
<H3>Session Cookies</H3>
<TABLE width="80%" border="0" bgcolor="#000000" cellspacing="1"
cellpadding="3">
<%
For Each strSession In Session.Contents
Response.write("<TR>")
Response.write("<TH width=""30%"" bgcolor=""#FFFFAE""
align=""left"">" & strSession & "</TH>")
Response.write("<TD bgcolor=""#FFFFD9""
align=""left"">" & Session(strSession) & " </TD>")
Response.write("</TR>")
Next
%>
</TABLE>
<BR>
<HR>
<BR>
<H3>Other variables</H3>
<TABLE width="80%" border="0" bgcolor="#000000" cellspacing="1"
cellpadding="3">
<TR><TH width="30%" bgcolor="#FFFFAE"
align="left">Session.sessionid</TH><TD bgcolor="#FFFFD9"><%=
Session.sessionid %></TD></TR>
<TR><TH width="30%" bgcolor="#FFFFAE"
align="left">Server.MapPath</TH><TD bgcolor="#FFFFD9"><%=
Server.MapPath ("/") %></TD></TR>
</TABLE>
</DIV>
</BODY>
</HTML>
<%
End Sub
%>
© 1999-2004 Synop Pty Ltd