目前,我
<cfset filedirectoryYear = "E:\FilesSubmitted\"&#form.current_year#&"\"&#form.division#&"\">
<cfif FORM.attachment_1 neq "">
<cffile action="upload"
accept="text/plain,application/msword,application/pdf,application/rtf"
filefield="attachment_1"
destination="E:\temp\uploads"
nameconflict="Makeunique"
>
<!--- rename the file and move it to permanent destination --->
<cfset submittedfileName =
#form.departmentname#&"_"&#form.departmentnumber#&"_"&#form.section_number_1#&"."&#cffile.ClientFileExt#>
<cfset presentfileName = #cffile.serverFileName#&"."&#cffile.ClientFileExt#>
<cffile
action="rename"
source="E:\temp\uploads\#presentfileName#"
destination=#filedirectoryYear##submittedfileName#
>
<!--- now create a temporary variable for the attachment so that it can be emailed later on --->
<cfset attachment_local_file_1 =
#filedirectoryYear#&#submittedfileName#&#cffile.ClientFileExt#>
</cfif>
<cfset attachment_local_file_1 = #filedirectoryYear#&#submittedfileName#>当我提交时,我会收到错误消息。
标记CFFILE的
属性验证错误。
属性源的值(当前为E:\temp\uploads\File.pdf )无效,因此引用了这一行。片段中的destination="#filedirectoryYear##submittedfileName#"
<cffile
action="rename"
source="E:\temp\uploads\#presentfileName#"
destination=#filedirectoryYear##submittedfileName#
>存在filedirectoryYear路径。有什么问题吗?我正在使用ColdFusion 8在带有IIS的Windows计算机上
发布于 2011-10-07 17:46:24
您觉得CF指向的是一个不正确的目的地,但是精明的观察者会注意到错误消息指出了“源”是问题所在。
您的代码声称源代码是E:\temp\uploads\(some variable)。
错误声明源是c:\Course Syllabi\uploads\Web Based System Two Page Handout.pdf
我会返回并确保您正在调试正确的代码行。
发布于 2013-06-03 10:38:17
对于这种类型的错误,请检查文件的路径,此错误发生在目标路径或源路径不正确的情况下。
check desired folder exist in same path
check Root Directory mean site URL is it correct
print the path and verify it with your directory surely there will be any conflict remove it that's why this error arisinghttps://stackoverflow.com/questions/7690846
复制相似问题