4
A
回答
8
我怎麼一個基本<cfexit>
的行爲的回憶是:
- 一個CFC內使用,
cfexit
退出CFC功能。但是 繼續處理調用頁面。 - 如果在一個函數內,但不在一個cfc內,則處理被中止。
更新: 我剛剛確認CF9.0.1
結果(使用cfexit)
Start calling page
Called test()
Finish calling page
Called on requestEnd
結果(使用cfabort)根據該行爲
Start calling page
Called test()
Called on requestEnd
Test.cfm
Start calling page <br />
<cfset createObject("component", "Foo").test()>
Finish calling page <br />
Foo.cfc
<cfcomponent>
<cffunction name="test" output="true">
Called test()<br />
<cfexit>
</cffunction>
</cfcomponent>
相關問題
- 1. 基值在int函數中做什麼?
- 2. Reorder()函數在Joomla中做了什麼?
- 3. 在ES6中做什麼Object.assign函數
- 4. $ rootScope在這個函數中做什麼?
- 5. RETURN TRUE在php函數中做什麼?
- 6. 函數_($ string)在PHP中做什麼?
- 7. 在Django中做什麼__str__函數?
- 8. R在geom_bar函數中做什麼?
- 9. 函數free()在PHP中做什麼?
- 10. cntk.blocks.Stabilizer()函數在CNTK中做什麼?
- 11. list()函數在Python中做什麼?
- 12. 函數中的函數在nodejs中做了什麼?
- 13. NSObject中的`delete`函數做什麼
- 14. python中的'with'函數做什麼?
- 15. 爲什麼我在生產環境中不能在ColdFusion CFC中調用函數?
- 16. 什麼是VBScript函數做什麼
- 17. peer_connection.onicecandidate()函數做什麼?什麼是ice_event?
- 18. 這個函數做什麼?
- 19. Wince - CreateProcess函數做什麼
- 20. OpenCL native_函數做什麼?
- 21. uint8函數做什麼?
- 22. 這個函數做什麼?
- 23. PHP函數@ $ _做什麼?
- 24. 那麼函數SDL_FreeSurface是做什麼的?
- 25. 做默認析構函數做什麼?
- 26. 什麼是打開:函數在JavaScript中做什麼?
- 27. 這個C函數在做什麼?
- 28. 這個函數在做什麼?
- 29. 這個構造函數在做什麼?
- 30. 這個Ruby函數在做什麼?
好了,所以它的行爲就像''如果'returntype'不是'void',它會拋出異常。 –
Henry
..或返回類型'string'。 – Leigh
只需使用返回。很好的問題。傻標籤:) –