我有以下代碼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