I have this code:
<cfset variables.incfilename = attributes.mode & ".cfm">
<cfif fileexists(evaluate(variables.incfilename))>
<cfinclude template="#variables.incfilename#">
<cfelse>
Which produces the error: CFML Runtime error: billingandshipping.cfm
does not exist.
So I replaced the whole thing with this code:
<cfinclude template="billingandshipping.cfm">
And it all works just fine???
So then I changed the original, just to test, like this:
<cfset variables.incfilename = "billingandshipping.cfm">
<cfif fileexists(evaluate(variables.incfilename))>
<cfinclude template="#variables.incfilename#">
<cfelse>
Which produces the error: CFML Runtime error: billingandshipping.cfm
does not exist.
Has anyone got any bright ideas on why this is so? In both instances
where it is throwing the error, it gets to the cfinclude, but thinks the
file doesn't exist. But the middle one just including the file straight
away works perfectly. Incidentally, the first, second and third code
blocks all work fine on my prod server running CFMX.
Thanks,
Ferg
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

