我試圖做到這一點ColdFusion的CFSET和可變範圍
<cfset noncooperativevariable = #serverfile#>
和我沒有定義錯誤serverfile。當我嘗試使用正確的變量範圍
<cfset noncooperativevariable = #CFFILE.serverfile#>
返回錯誤。
您試圖取消引用類java.lang.String的標量變量作爲包含成員的結構。
編輯:
<cffile action="upload" filefield="fileUpload" destination="#destination#" nameConflict="makeUnique" result="upload">
<cfset noncooperativevariable = #fileUpload.serverfile#>
你是否在CFFILE上傳後直接執行此操作? –
是的,我添加了一些代碼來更好地瞭解我在做什麼。 – John
這是一個奇怪的錯誤,我想也許是一條紅色的鯡魚。在你的'cfset'中,你不想要「#upload.serverfile#」嗎?你有'upload'作爲'result ='值。 – ale