[thelist] CF: Session Lists. A cleaner way?
.jeff
jeff at members.evolt.org
Sat Jul 27 19:36:00 CDT 2002
frank,
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> 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">
session['#key#']:
<cfif IsSimpleValue(session[key])>
#session[key]#
<cfelseif IsStruct(session[key])>
Structure with #StructCount(session[key])# elements
<cfelseif IsArray(session[key])>
Array with #ArrayLen(session[key])# elements
</cfif>
<br>
</cfloop>
</cflock>
good luck,
.jeff
http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/
More information about the thelist
mailing list