我在 lucee 5.1.0.34 上配置了 fusebox 5 应用程序。 com/reports/文件夹中有一个 cfc。当我从 cfc 运行远程方法时。它给了我以下错误。
coldfusion - Lucee 文档为空错误-LMLPHP
这是我的 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
我检查了日志并搜索了很多。我没有找到有关此问题的任何帮助。任何机构都可以帮我解决这个问题吗

最佳答案

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

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

关于coldfusion - Lucee 文档为空错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/42073273/

10-12 18:33