我想使用此代碼上傳文件到我的服務器,但給我一個錯誤。CFFILE上傳所有問題 - Coldfusion 9
這是代碼:
<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>
這是錯誤:
The following information is meant for the website developer for debugging purposes.
Error Occurred While Processing Request
Invalid content type: application/x-www-form-urlencoded.
The files upload action requires forms to use enctype="multipart/form-data".
The error occurred in E:\sites\Example.Com\testing\handlers\upload\after.cfm: line 20
是你運行CF9還是9.0.1?在9.0.1更新程序中修復了CF9原始版本中的文件上載控制問題。 – Brian
我正在使用9.0.1 – Geo