我在创建目录之前正在使用cffile时遇到问题。我正在使用cffileupload标记,并且我的url属性是具有以下代码的页面。基本上下面的代码创建一个新目录并将所有图像上传到该目录。但是,它在第二次上传时失败,并且在cffileupload flash对象中出现500错误。但是,如果我对目录路径进行硬编码,它们都会正常上传。任何人都知道我为什么会遇到这个问题?将文件上传到Coldfusion中新创建的目录
<!--- User will upload all the images to a temp directory based on date and time --->
<cfset uploadFolderPath = "C:\ColdFusion9\wwwroot\MyApplication\uploads\" />
<cfset date=DateFormat(Now(),'mm-dd-yyyy_') />
<cfset time=TimeFormat(Now(),'hh-mm-ss') />
<cfset newFolderName = "upload_" & date & time />
<cfset newFolder = uploadFolderPath & newFolderName />
<cfdirectory action = "create" directory="#newFolder#" />
<cffile action="uploadall" destination="#newFolder#" nameconflict="makeunique" />