我每天收到錯誤Element XMLZONE is undefined in REQUEST
幾十次。元素XMLZONE在請求
PageDisplay.cfm調用request.xmlzone這是通過頁面設置ZoneManager.cfm,使用以下(削減)代碼
<cfscript>
variables.aZoneInfo = XmlSearch(application.xmlZones, "//zone[position() = 1]");
try {
request.xmlZone = ToString(variables.aZoneInfo[1]);
}
catch(any expt)
{
variables.objZoneDAO = CreateObject("component", "#application.sComponentDir#ZoneDAO").init(application.sDSN);
variables.objZoneDAO.Read(variables.objZone, 1); }
</cfscript>
現在,XML永遠不會改變那麼值得將XML文件/節點作爲變量添加到PageDisplay.cfm是否值得?我也想知道爲什麼會失敗 - 爲什麼?
感謝,
JJ
謝謝 - 我會研究這一點。目前,我正在使用'cfxml'來設置一個變量,並使用它來替代,因爲XML永遠不會改變(我已經順便把這個站點改爲了 - 這不是我自己的工作!) – pee2pee