gpt4 book ai didi

coldfusion - 找不到自定义标签的CFML模板

转载 作者:行者123 更新时间:2023-12-03 09:40:48 25 4
gpt4 key购买 nike

我不是ColdFusion编码器。为一个 friend 提供帮助,该 friend 将其CF站点从Windows服务器移植到GoDaddy上的Unix。

网站显示错误:

Cannot find CFML template for custom tag jstk. ColdFusion attempted looking in the tree of installed custom tags but did not find a custom tag with this name.



我发现的站点位于文档根目录/CustomTags中,带有jstk.cfm文件和cf_jstk中的一组文件

我的Google搜索网站位于:

You must store custom tag pages in any one of the following: The same directory as the calling page; The cfusion\CustomTags directory; A subdirectory of the cfusion\CustomTags directory; A directory that you specify in the ColdFusion Administrator



所以我有:
  • 尝试在/cfusion/CustomTags中创建放置/CustomTag的位置
  • 尝试将/cfusion/CustomTags复制到以上文档根
  • 尝试将jstk.cfm和子文件夹复制到与调用文件(index.cfm)相同的目录中

  • 更新:在GoDaddy支持下,我还尝试添加以下内容无效: <cfmodule template="CustomTags/jstk.cfm">
    有人可以给我一些提示吗?还是我应该告诉我的家伙寻找CF编码器?

    谢谢!

    最佳答案

    我不知道GoDaddy的设置方式,因此作为快速测试,请执行以下操作:

    在webroot中创建包含内容的test.cfm文件:

    <cf_testtag/>
    <cfoutput>test</cfoutput><cfabort/>

    在webroot中创建包含内容的 testtag.cfm文件:
    <cfdump var=#ThisTag# />

    然后在浏览器中访问test.cfm页面。

    您应该获得两个调试转储,然后是“test”。这将确认自定义标签总体上可以正常工作。

    如果可行,请将 testtag.cfm移至CustomTags目录,然后查看是否出现相同的行为或错误。

    如果这会导致错误,则对于CF8及更高版本,您可以在 <cfset This.CustomTagPaths = "/CustomTags" />文件中添加 Application.cfc(假设有一个App cfc而不是 Application.cfm)以确保检查目录中的标签。

    可以将Application.cfm转换为Application.cfc-这有多容易,取决于其中代码的复杂程度-可能您会发现一些问题,或者可能需要经验丰富的CF开发人员。

    根据结果​​,我们可以尝试调试 jstk标记为何不起作用的情况(除非以上解决方法之一)。

    关于coldfusion - 找不到自定义标签的CFML模板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2835428/

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