我想刪除並重新創建一個測試文件,但得到下面的錯誤。誰能告訴我爲什麼會發生這種情況?ColdFusion無法刪除文件,原因未知
錯誤:
ColdFusion could not delete the file e:\sample\test2.html for an unknown reason.
代碼:
<cfif FileExists("e:\sample\test2.html")>
<cffile action="delete"file="e:\sample\test2.html"><br>
<p>deleted the file </p>
<cfelse>
<p>Sorry, can't delete the file - it doesn't exist.</p>
</cfif>
<cfset createObject("java", "java.lang.Thread").sleep(JavaCast("int", 90000))>
<cfsavecontent variable="HTML">
<cfinclude template="noticeEmail.cfm">
</cfsavecontent>
<cffile action="WRITE" attributes = "normal" nameconflict="Overwrite"
file="e:\sample\test2.html" output="#HTML#">
這與你的錯誤沒有任何關係,但'nameconflict'屬性不適用於'action =「write」',只能上傳。 – Leigh 2012-04-18 15:53:07