ColdFusion Application.cfm cfinclude not working

Viewed 476

I have a function called "conv" which is needed in several programs within my application. So rather than include it in each program, I put it in the Application.cfm, which looked like this:

<cfapplication name = "Moxware" sessionmanagement = "Yes">  
<cfset lang = "LU">
<cfset x127 = Chr(127)>   
<cfset mmox = 'Moxware'>
<cfinclude template="conv.cfc">

When I ran one of the programs using the function "conv" (which is in conv.cfc) I got an error that the function conv could not be found.

After I hunted around the internet for ideas I tried this:

<cfapplication name = "Moxware" sessionmanagement = "Yes">  
<cfset lang = "LU">
<cfset x127 = Chr(127)>   
<cfset mmox = 'Moxware'>
<cffunction name="onRequestStart" output="true" returntype="void">
   <cfinclude template="conv.cfc">
</cffunction>

That gave me the same error message as before.

Can someone explain to me how to do this?

Note that the function conv was tested and works just fine.

2 Answers
Related