作业帮 > ASP > 教育资讯

asp源码:查看服务器Application/Session变量工具

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/03 07:14:01 ASP
asp源码:查看服务器Application/Session变量工具
asp源码:查看服务器Application/Session变量工具ASP
【无忧考网-asp源码:查看服务器Application/Session变量工具】:
  <%@LANGUAGE="javascript" CODEPAGE="936"%> 
  <% 
  Response.Expires = 0; 
  Response.Buffer = true; 
  var tPageStartTime = new Date(); 
  %> 
   
   
  网站-Application变量-Session变量 
   
http-equiv="Content-Type" content="text/html; charset=gb2312"> 
   
   
   
   
   
   
   
   
   
   
   
  
 
   
   
   
   
   
  
服务器Application变量 [共 <%=Application.Contents.Count%> 个] 
  
 
   
   
   
   
   
  <% 
  var iCount = 0; 
  var sVarType = ""; 
  var oApplication = new Enumerator(Application.Contents); 
  var oApp; 
  for(;!oApplication.atEnd();oApplication.moveNext()){ 
  oApp = oApplication.item(); 
  sVarType = typeof(Application.Contents(oApp)); 
  ++iCount; 
  %> 
   
   
   
   
  <% 
  } 
  if(!iCount){ 
  %> 
   
   
   
  <% 
  } 
  %> 
  
 变量 值
<%=oApp%>
[<%if(sVarType=="unknown") {Response.Write("Array");}else{Response.Write(sVarType);}%>]
 
  <% 
  try{ 
  if(sVarType=="unknown"){ 
  var oTmp = new VBArray(Application.Contents(oApp)); 
  Response.Write(Server.HTMLEncode(oTmp.toArray())); 
  }else Response.Write(Server.HTMLEncode(Application.Contents(oApp))); 
  }catch(e){ 
  Response.Write("[Unknow]"); 
  } 
  %> 
  
没有Application变量
 
  
 
   
   
   
   
   
   
   
   
   
   
  
 
   
   
   
   
   
  
服务器Session变量 [共 <%=Session.Contents.Count%> 个] 
  
当前会话编号: <%=Session.SessionID%>
 
   
   
   
   
   
  <% 
  var iCount = 0; 
  var sVarType = ""; 
  var oSession = new Enumerator(Session.Contents); 
  var oSes; 
  for(;!oSession.atEnd();oSession.moveNext()){ 
  oSes = oSession.item(); 
  sVarType = typeof(Session.Contents(oSes)); 
  ++iCount; 
  %> 
   
   
   
   
  <% 
  } 
  if(!iCount){ 
  %> 
   
   
   
  <% 
  } 
  %> 
  
 变量 值
<%=oSes%>
[<%if(sVarType=="unknown") {Response.Write("Array");}else{Response.Write(sVarType);}%>]
 
  <% 
  try{ 
  if(sVarType=="unknown"){ 
  var oTmp = new VBArray(Session.Contents(oSes)); 
  Response.Write(Server.HTMLEncode(oTmp.toArray())); 
  }else Response.Write(Server.HTMLEncode(Session.Contents(oSes))); 
  }catch(e){ Response.Write("[Unknow]"); 
  } 
  %> 
  
没有Session变量
 
  <% tPageEndTime = new Date(); %> 
  
<%="

页面执行时间:约 "+((tPageEndTime-tPageStartTime))+" 毫秒"%>
 
  
ASP