我正在寻找一种从ColdFusion字符串中解析HTML标记的快速方法.我们正在提供一个RSS源,它可能包含任何内容.然后我们对信息进行一些操作,然后将其吐回另一个地方.目前我们正在使用正则表达式.有一个更好的方法吗?
<cfloop from="1" to="#ArrayLen(myFeed.item)#" index="i">
<cfset myFeed.item[i].description.value =
REReplaceNoCase(myFeed.item[i].description.value, '<(.|\n)*?>', '', 'ALL')>
</cfloop>
Run Code Online (Sandbox Code Playgroud)
我们正在使用ColdFusion 8.
我正在尝试使用以下代码通过 API从Box.com下载文件。
<cfhttp url="https://api.box.com/2.0/files/(FILE_ID)/content/" method="GET" redirect="true" >
<cfhttpparam type="header" name="Authorization" value="Bearer (DEVELOPER_TOKEN)">
</cfhttp>
Run Code Online (Sandbox Code Playgroud)
根据文档,它应该302 Found
作为响应返回。并重定向到 dl.boxcloud.com 进行下载。但我得到的200
回应。
不知道为什么我得到 200 作为回应。我需要通过 API 调用下载文件。我错过了什么吗?
任何人都可以解释为什么我们where 1=1
在SQL选择查询中使用?
Select * from <TableName>
Where 1=1
<cfif isdefined('Something)>
AND columnName = value
</cfif>
Run Code Online (Sandbox Code Playgroud) coldfusion ×3
box ×1
box-api ×1
boxapiv2 ×1
coldfusion-8 ×1
html-parsing ×1
regex ×1
rss ×1
sql ×1