首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏szhshp 的第四边境中转站

    ColdFusion - Getting Started

    >

  • #i#
  • </cfoutput> </cfloop> break <cfbreak> Loop for List <cfset test="aaa,bbb,ccc,ddd "> <cfloop list="#test#" index="i"> <cfoutput> #i# </cfoutput> </cfloop> 在 loop 中使用其他列表的时候需要加上对应的井号 > listGetAt(list, i) </cfoutput> </cfloop> Query 循环 Syntax <cfloop query = "query name" # #ADMIN# </cfoutput> </cfloop> <cfoutput> #result.sql# </cfoutput> 此外还可以直接使用 <cfoutput> 的 Query 属性来输出 同样直接使用对应的列名 <cfoutput query="query"> #ADMIN# </cfoutput> Structure 循环 Syntax <cfset myBooks

80260编辑于 2022-09-21
  • 来自专栏szhshp 的第四边境中转站

    ColdFusion - Basic - cfc, cfcomponent, cffunction, cfinvoke

    测试时发现需要将所有的参数按顺序传入 示例 <cfobject name="obj" component="function"/> <cfset result2=obj.funcwitharg(4)/> <cfoutput > #result2# </cfoutput> <cfset result3=obj.funcwitharg(4,5)/> <cfoutput> #result3# </cfoutput> function.cfc <cfcomponent> <! </cffunction> </cfcomponent> cfObject 示例 <cfset object=createObject("component","function") /> <cfoutput > #object.funcwitharg(1,2,3)# #object.funcwitharg(arg1="1",arg3="5")# </cfoutput>

    69630编辑于 2022-09-21
  • 来自专栏szhshp 的第四边境中转站

    ColdFusion-命令速查与日常使用-CheatSheet Pt 2

    ---> <cfquery name="getSites" datasource=""> …… </cfquery> <cfcontent reset="true" /> <cfoutput > #SerializeJSON(getSites,true)# </cfoutput> Query of Query <cfset subCategoryIDs=valueList(getsubcategories.subCategoryID > <cfoutput> #mystring#
    #mystring2#
    Here is a number sign: ## </cfoutput> Output: We all list="Partner,Response Date,Response Status" /> <cfloop from="1" to="#listLen(list)#" index="i"> <cfoutput > listGetAt(list, i) </cfoutput> </cfloop> Array 在 cfscript 中以 data=[0,0,0,0,0] 的形式出现 在 HTML 中以

    60720编辑于 2022-09-21
  • 来自专栏szhshp 的第四边境中转站

    ColdFusion - Scope in cffunction

    So a variable defined as: <cfset var mySafeVariable=1> can be safely accessed as: <cfoutput>#LOCAL.mySafeVariable #</cfoutput>

    54240编辑于 2022-09-21
  • 来自专栏szhshp 的第四边境中转站

    ColdFusion - Basic - cfset

    names3 和 names4 实际上是 6 <cfloop from="1" to="10" index="i"> <cfloop from="1" to="10" index="j"> <cfoutput > #i+j# </cfoutput> </cfloop> </cfloop> 这段代码会输出总和 但是注意如果将输出行改为 #i#+#j# 那么就会输出很多 X+X 这种格式的东西

    1.1K60编辑于 2022-09-21
  • 来自专栏szhshp 的第四边境中转站

    ColdFusion - Basic - cfquery

    from ltbContact; </cfquery> 使用方法 CF: 一般搜索结果会有很多行, 因此只需要使用循环输出 <cfloop index="i" from="0" to="10"> <cfoutput > #i# - #q['CONTACTID'][i]#
    </cfoutput> </cfloop> 如果只需要输出第一行就只需要把第二个 index 改为 1 #bigquery

    62920编辑于 2022-09-21
  • 来自专栏szhshp 的第四边境中转站

    ColdFusion-命令速查与日常使用-CheatSheet Pt 1

    True:False; </cfscript> <cfoutput> #a# </cfoutput> Coldfusion 日期相关 上周最后一天 ##DateFormat(DATE - DayOfWeek > <cfdump var="#xAxisLabelsdata#" expand="false"> Loop in Array

    Demo For Loop in Array

    <cfoutput --->
    #i# - #xAxisLabelsdata[i]#
    </cfloop> </cfoutput

    1.1K40编辑于 2022-09-21
  • 来自专栏szhshp 的第四边境中转站

    ColdFusion - Custom Tag 自定义标签

    name="ATTRIBUTES.anothermsg" type="string" default="this is another msg">
    custom tag begins
    <cfoutput > #ATTRIBUTES.message#
    #ATTRIBUTES.anothermsg# </cfoutput>
    custom tag ends

    59530编辑于 2022-09-21
  • 来自专栏FreeBuf

    挖洞经验 | 发现Lucee 0day漏洞RCE掉三个苹果公司网站

    如下错误参数: 正确参数: 经过分析,我们发现imgProcess.cfm文件中存在一个路径遍历漏洞,可以利用该漏洞以给定内容在服务器任意位置创建文件: <cfoutput> <cffile action temp-directory}/admin-ext-thumbnails/')#\__#url.file#" Output="#form.imgSrc#" createPath="true"> </cfoutput

    1.3K10发布于 2021-03-09
  • 领券