gpt4 book ai didi

coldfusion - 你把cfimport放在哪里

转载 作者:行者123 更新时间:2023-12-01 11:09:59 25 4
gpt4 key购买 nike

我的 cfimport 在页面上工作,但我尝试将它移动到 onRequestStart 但它没有工作。然后我尝试将它放在一个 cfinclude 文件夹中,但没有用。cfimport 是否必须位于页面本身?

最佳答案

是的,标签只能在使用cfimport的页面上使用;来自 the documentation :

The cfimport tag must be on the page that uses the imported tags. For example, if you use a cfimport tag on a page that you include with the cfinclude call, you cannot use the imported tags on the page that has the cfinclude tag. Similarly, if you have a cfimport tag on your Application.cfm page, the imported tags are available on the Application.cfm page only, not on the other pages in the application. ColdFusion does not throw an error in these situations, but the imported tags do not run.

关于coldfusion - 你把cfimport放在哪里,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1038369/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com