hi Richard,
I'm pretty sure that you can't, but for good reason. Many people use CF in a
shared environment. If you could enumerate server, client & variables, you
could see *every* server client & variable that every person is using on the
server.. :) I admit, that would be fun, but most likely will not be
available anytime soon.
Aaron Johnson, MCSE, MCP+I
Allaire Certified ColdFusion Developer
MINDSEYE, Inc.
<phn>617.350.0339
<fax>617.350.8884
<icq>66172567
[EMAIL PROTECTED]
-----Original Message-----
From: Richard Meredith-Hardy [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 15, 2001 3:09 PM
To: CF-Talk
Subject: enumerating variables
With my debug script I can enumerate most system variables thus:
<CFSET structlist="application,session,form,url,cgi">
<CFLOOP LIST="#structlist#" INDEX="struct">
<CFIF isdefined("#struct#")>
<CFIF isstruct(evaluate(struct))>
<CFOUTPUT>
<B>#struct# variables:</B><BR>
<CFLOOP LIST = "#structkeylist(evaluate(struct))#" INDEX="var">
#var#:
<CFIF isstruct(structfind(evaluate(struct),var))>
<B>A structure</B><BR>
<CFELSEIF isarray(structfind(evaluate(struct),var))>
<B>An array</B><BR>
<CFELSEIF isquery(structfind(evaluate(struct),var))>
<B>A query</B><BR>
<CFELSE>
#structfind(evaluate(struct),var)#<BR>
</CFIF>
</CFLOOP>
</CFOUTPUT>
</CFIF>
<BR>
<CFELSE>
<CFOUTPUT>#struct# not defined<BR> <BR></CFOUTPUT>
</CFIF>
</CFLOOP>
But....
server.variables, client.variables and variables.variables don't seem to
be accessible at all in the method above or any other 'automated' way
(try adding them to structlist); - is there a way of enumerating them
all at the end of a page?
--
Regards;
Richard Meredith-Hardy
-------------------------------------------------------------
[EMAIL PROTECTED]
Tel: + 44 (0)1462 834776 FAX: + 44 (0)1462 732668
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists