ColdFusion ServerFile is undefined in CFFile

青春壹個敷衍的年華 提交于 2020-01-15 23:37:15

问题


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>

回答1:


You are using the result attribute. So instead of cffile.serverFile, use thisResult.serverFile.

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.



来源:https://stackoverflow.com/questions/15484724/coldfusion-serverfile-is-undefined-in-cffile

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!