You are not modifying it for path so "fileexists( )" should crap out - unless BD does relative paths... does it? Also -
what's with the "evaluate( )" function? Seems superflous to me.

-mk
  -----Original Message-----
  From: Ken Ferguson [mailto:[EMAIL PROTECTED]
  Sent: Thursday, August 19, 2004 9:31 AM
  To: CF-Talk
  Subject: BlueDragon cfinclude issues

  This happens on BD 6.1 as my dev server.

  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]

Reply via email to