我有以下代码ColdFusion的字符串::分裂()问题
<cffunction name="getObjTag" returnType="string" output="false">
<cfargument name="obj" Type="string" required="true">
<cfargument name="tagname" Type="string" required="true">
<cfreturn obj.split("<" & tagname.toUpperCase() & ">")[2]>
</cffunction>
这将导致以下错误
Invalid CFML construct found on line 96 at column 63.
ColdFusion was looking at the following text:
[
The CFML compiler was processing:
A cfreturn tag beginning on line 96, column 10.
A cfreturn tag beginning on line 96, column 10.
这是为什么?这发生在编译,而不是运行。
很好的答案,但也见我的。 CF9可以处理这个问题。 – 2011-02-17 14:21:56