CFFile中未定义ColdFusion ServerFile [英] ColdFusion ServerFile is undefined in CFFile

查看:87
本文介绍了CFFile中未定义ColdFusion ServerFile的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试运行以下代码时,出现错误消息:"Element SERVERFILE is undefined in CFFILE.".我已经做了一百万遍了.谁能看到我所缺少的东西?

When I try to run the following code, I'm getting the error message: "Element SERVERFILE is undefined in CFFILE.". I've done this a million times. Can anyone see what I'm missing?

    <cffile action="upload" fileField="fileField" destination="xxxx" 
        nameConflict="Overwrite" result="thisResult">
    <cfoutput>#cffile.ServerFile#</cfoutput>

推荐答案

您正在使用 result 属性.因此,请使用thisResult.serverFile代替cffile.serverFile.

结果,用于为cffile返回变量的变量指定名称. 结果(或状态)参数.如果您没有为此指定值 属性,cffile使用前缀cffile.有关更多信息,请参见 用法.

Result Lets you specify a name for the variable in which cffile returns the result (or status) parameters. If you do not specify a value for this attribute, cffile uses the prefix cffile. For more information, see Usage.

这篇关于CFFile中未定义ColdFusion ServerFile的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆