我正在尝试创建到父文件夹的特定于应用程序的映射。出于某种原因,这适用于我的本地开发环境,我收到错误
无效的组件定义,找不到组件 [cfc.udf]
目录结构:
--- website1
------- application.cfc
--- cfc
------ udf.cfc
application.cfc 上的代码:
<cfcomponent>
<cfset This.name = "Website1">
<cfset This.Sessionmanagement=true>
<cfset This.Sessiontimeout="#createtimespan(0,0,30,0)#">
<cfset this.mappings["/cfc"] = expandPath('../cfc') />
<cffunction name="onApplicationStart">
<cfset Application.udf = createObject("cfc.udf")>
</cffunction>
</cfcomponent>
我正在使用 Lucee 1.5
当我输出应用程序时,如下所示:
<cfset app = CreateObject("component", "application") />
<cfdump var="#app#">
我明白了
MAPPINGS
Struct
cfc string D:\WebSites\parent-directory\cfc
我有点失落
更新:
回应@leigh:
--- parent-directory
--- website1
--- application.cfc
--- cfc
--- udf.cfc