1
我正在尝试创建特定于应用程序的映射到父文件夹。出于某种原因,这个工作对我的本地开发环境中,我得到的错误特定于应用程序映射到父文件夹
无效组件定义,找不到成分[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
WHE n个I输出的应用,例如:
<cfset app = CreateObject("component", "application") />
<cfdump var="#app#">
我得到
MAPPINGS
Struct
cfc string D:\WebSites\parent-directory\cfc
我有点失去
UPDATE:
响应@leigh:
--- parent-directory
--- website1
--- application.cfc
--- cfc
--- udf.cfc
与之前的“目录结构:”示例相关的“父目录”是什么? – Leigh
@leigh:请参阅上面的 –
当你执行''你会得到列出的预期路径吗? –