3

我在 lucee 5.1.0.34 上配置了 fusebox 5 应用程序。com/reports/ 文件夹中有一个 cfc。当我从 cfc 运行远程方法时。它给了我以下错误。

在此处输入图像描述

这是我的cfc代码。

<cfcomponent displayname="Reports" output="yes">
<cffunction name="test" access="remote" output="yes">
    <cfoutput>testing</cfoutput>
</cffunction>
</cfcomponent>

我正在像这样在浏览器中运行该方法。

http://example.com/com/reports/abc.cfc?method=test

我检查了日志并搜索了很多。我没有找到关于这个问题的任何帮助。任何机构都可以帮我解决这个问题

4

1 回答 1

2

默认情况下,运行远程方法会返回内容类型为 text/xml 的页面。您的浏览器将其解释为损坏的 xml。试试这个。

<cfcomponent displayname="Reports" output="yes">
    <cffunction name="test" access="remote" output="yes">
       <cfcontent type="text/html">
       <cfoutput>testing</cfoutput>
    </cffunction>
</cfcomponent>
于 2017-02-09T05:19:04.043 回答