Thanks everyone - getClientVariablesList() of course only returns
non-readonly client variables so my debug script does in fact have
another section similar to below where I loop thru a list like this:  
<CFSET cvlist = "CFID,CFToken,URLToken,Hitcount,TimeCreated,Lastvisit,"
& getClientVariablesList()>
They don't seem to be in a structure like application,cgi vars Etc  and
have to be addressed directly.

Server variables I don't mind about as I never use them, but ordinary
variables.variables ?  

These are scoped only to the script being executed so there doesn't seem
to me to be any more security implications in being able to enumerate
them than session or client vars - I just don't seem to be able to
'grab' the names.  

It would be dead handy to be able to quickly cfinclude a debug script at
any point in a script to see the current state. (rather than
cfoutputting the problem var by hand which is what I usually have to
resort to)



> Date: Thu, 15 Mar 2001 16:06:41 -0500
> From: "Jon Hall" <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: enumerating variables
> Message-ID: <02a301c0ad93$d5761fa0$a41f88d8@ns2>
> 
> Server variables are not available for security reason. Client variables are
> retrieveable with getClientVariableList().
> 
> jon
> ----- Original Message -----
> From: "Richard Meredith-Hardy" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Thursday, March 15, 2001 3:09 PM
> 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>&nbsp;<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

Reply via email to