Why is a ColdFusion SESSION variable “undefined” after being referenced a few lines before?
问题 Running ColdFusion 8.01 Standard on Windows2003/IIS6 Application.cfc: <cfcomponent output="false"> <cfscript> THIS.SessionManagement = "Yes"; THIS.SessionTimeout = CreateTimeSpan(0, 3, 0, 0); THIS.ApplicationTimeout = CreateTimeSpan(0, 8, 0, 0); </cfscript> <cffunction name="onRequestStart" returnType="Boolean" output="false"> <cfargument name="targetPage" type="string" required="true"> <cfscript> if (!StructKeyExists(SESSION, "User")) SESSION.User = CreateObject("component", "cfc.User"); <