[thelist] CF: Session Lists. A cleaner way?

.jeff jeff at members.evolt.org
Sat Jul 27 19:36:00 CDT 2002


> From: Frank
> I needed to take a look at all the session variables
> that I was using, so I hacked out this quick and dirty.

if you're on cf5, then just use the <cfdump> tag:

<cfdump var="#session#">

if you're not on cf5, then you'll need to dump it manually using a collection loop and datatype checking.

<cflock type="readonly" scope="session" timeout="10" throwontimeout="no">
  <cfloop collection="#session#" item="key">
    <cfif IsSimpleValue(session[key])>
    <cfelseif IsStruct(session[key])>
      Structure with #StructCount(session[key])# elements
    <cfelseif IsArray(session[key])>
      Array with #ArrayLen(session[key])# elements

good luck,


jeff at members.evolt.org

More information about the thelist mailing list