我正在尝试使用此代码将文件上传到我的服务器,但给了我一个错误。
这是代码:
<cfif isdefined("form.submit")>
<cffile action="uploadall" destination="#expandpath('../../images/Uploads/after')#">
</cfif>
<cfform action="#cgi.script_name#" enctype="multipart/form-data">
<cfinput type="file" name="attachment1"><br>
<cfinput type="file" name="attachment2"><br>
<cfinput type="file" name="attachment3"><br>
<cfinput type="submit" name=" submit" value="submit">
</cfform>
这是错误:
以下信息仅供网站开发人员用于调试目的。
处理请求时发生错误
无效的内容类型:application/x-www-form-urlencoded。
文件上传操作要求表单使用 enctype="multipart/form-data"。
错误发生在 E:\sites\Example.Com\testing\handlers\upload\after.cfm:第 20 行