That's what I thought when I looked at the code.
I've found it to be really bad, in any language, to call variables any kind of name 
that may be or may _ever_ become a reserved word.
I always prefix a variable name with something, even if its just 'temp' or 'my', eg 
myFile or temp_file or anything that's not just a standard name.

I had the same problem years ago where some generic JavaScript I had on a page 
suddenly stopped working on newer browsers. It turned out that a variable name that we 
had used, that was fine in all previous versions, had suddenly become a reserved word 
and was breaking this previously functioning code.

Darren Tracey

> -----Original Message-----
> From: Rod Higgins [mailto:[EMAIL PROTECTED]
> Sent: Monday, 19 January 2004 11:30 AM
> To: CFAussie Mailing List
> Subject: [cfaussie] Re: cfmx cffile feature test
> 
> 
> When I run the code on both our production and development servers the
> cffile read creates an empty structure, even though the text 
> file exists
> and has content. I had to change the variable="file" attribute in the
> cffile tag to not use the word "file". Can anyone else replicate this
> problem or am I just lucky?
> 
> > Hmm...
> > 
> > I looked at the code.. and couldn't see anything wrong with it.. and
> > then ran the code.. and it worked as I expected...
> > 
> > Did I miss something?
> > 
> > bye!
> 
> > RH> Just came across something interesting. In cfmx 6.1 the 
> following code
> > RH> will not work ... well it works but not how you would 
> expect. Im on a
> > RH> windoze 2k platform.
> > 
> > RH> <cfif fileexists(trim(filepath))>
> > RH> <CFFILE ACTION="Read"
> > RH>     FILE="#trim(filepath)#"     
> > RH>     VARIABLE="file">
> > RH> <cfdump var="#file#">
> > RH> </cfif>
> 

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to