gpt4 book ai didi

coldfusion - 通过 Coldfusion 中的 cfset 的长/多行内容

转载 作者:行者123 更新时间:2023-12-04 16:41:25 24 4
gpt4 key购买 nike

有没有办法用 cfset 设置一个更像 cdata 标签的变量

或者是否有另一种方法可以让页面设置一些基本变量并为主要内容设置几个更长的变量;

IE。

<cfoutput>
<CFSET page_title = "TITLE">
<CFSET examplevariable = "ABC">

<CFSET content>
<!--something like this-->
<div>
bunch of content without any cf tags
</div>
</CFSET>

<cfinclude template="include/layout.cfm">

</cfoutput>

最佳答案

<cfsavecontent variable="header">
<cfoutput>
I can be HTML, javascript anything text.
remember to escape pound sysmbols ie: ##FF0000 instead of #FF0000
I can even <cfinclude template="headerpage.cfm"> and will be stored in variable
called header
</cfoutput>
</cfsavecontent>

<cfoutput>#header#</cfoutput>

关于coldfusion - 通过 Coldfusion 中的 cfset 的长/多行内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4620033/

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