asp如何显示全部的环境变量?
时间:2010-06-08 09:34:00
asp如何显示全部的环境变量?
<%@Language="VBScript"%>
<%
dim Header, Footer
header = "<table border=""1"" align=""center"" width=""400"">"
footer = "</table>"
Response.Write("cookies" & header)
for each item in Request.Cookies
Response.Write("<tr><td>" & item & "</td><td>" & Request.Cookies(item) & "</td>")
next
Response.Write(footer & "server vars" & header)
for each item in request.servervariables
Response.Write("<tr><td>" & item & "</td><td>" & Request.ServerVariables(item) & "</td></tr>")
next
response.write(footer & "session contents" & header)
for each item in session.contents
Response.Write("<tr><td>" & item & "</td><td>" & session(item) & "</td></tr>")
next
response.write(footer & "application contents" & header)
if Len(application.contents) = 0 then
for each item in application.contents
Response.Write("<tr><td>" & item & "</td><td>" & application(item) & "</td></tr>")
next
%>
<table border="0">
<tr><td><b>Script engine : </td>
<td><%= scriptengine() %></td>
<td><%= scriptenginemajorversion() %>:</td>
<td><%=scriptengineminorversion() %></td>
<td><%= scriptenginebuildversion() %></td></tr></table>