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:請參閱上面的 –
當你執行''你會得到列出的預期路徑嗎? –