我对基本<cfexit>行为的回忆是:
cfexit退出cfc功能.但是继续处理呼叫页面.更新: 我刚刚确认了CF9.0.1下的行为
结果(使用cfexit)
Start calling page
Called test()
Finish calling page
Called on requestEnd
Run Code Online (Sandbox Code Playgroud)
结果(使用cfabort)
Start calling page
Called test()
Called on requestEnd
Run Code Online (Sandbox Code Playgroud)
Test.cfm
Start calling page <br />
<cfset createObject("component", "Foo").test()>
Finish calling page <br />
Run Code Online (Sandbox Code Playgroud)
Foo.cfc
<cfcomponent>
<cffunction name="test" output="true">
Called test()<br />
<cfexit>
</cffunction>
</cfcomponent>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1244 次 |
| 最近记录: |