[thelist] CF: UDF in Application.cfm not accessible?

M Kelsey morgan at morgankelsey.com
Thu Aug 18 19:57:16 CDT 2005


Frank,

> How can I go about including my UDF's only once, and have them acessible 
> from all my scripts?
> 

here's what I do in Application.cfm:

<cfdirectory action="LIST" 
 name="formList" 
 directory="drive-letter:\path-to-site\app_functions\"
 > 
<cfsilent> 
<cfoutput query="formList">
  <cfif Find('.cfm',formList.name)>
    <cfinclude template="../_www_apps/app_functions/#formList.name#">
  </cfif>
</cfoutput>
</cfsilent>

I'm not really a cfc kind of guy, but that works fine for my UDFs. 
I just throw them in my "app_functions" folder and they're good to go.


Morgan Kelsey
http://www.morgankelsey.com




More information about the thelist mailing list