-1

I'm having a little trouble with cffileupload. Basically it's not displaying anything... Either, I've missed something obvious or there's a server issue. Here's the code (dead simple)

<cfoutput>
<h2>Upload new data</h2>
<p>Please choose an Excel file to upload</p>
<cffileupload url="save.cfm" / >
</cfoutput>

URL: http://www.office5star.co.uk/

Any ideas ?

4

1 回答 1

2

当我点击你的那个 URL 时,我得到了一大堆 404:

GET http://www.office5star.co.uk/CFIDE/scripts/ajax/yui/yahoo-dom-event/yahoo-dom-event.js 404 (Not Found) www.office5star.co.uk/:7
GET http://www.office5star.co.uk/CFIDE/scripts/ajax/messages/cfmessage.js 404 (Not Found) www.office5star.co.uk/:7
GET http://www.office5star.co.uk/CFIDE/scripts/ajax/resources/ext/css/ext-all.css 404 (Not Found) www.office5star.co.uk/:7
GET http://www.office5star.co.uk/CFIDE/scripts/ajax/resources/cf/uploadfile.css 404 (Not Found) www.office5star.co.uk/:7
GET http://www.office5star.co.uk/CFIDE/scripts/ajax/ext/adapter/yui/ext-yui-adapter.js 404 (Not Found) www.office5star.co.uk/:7
GET http://www.office5star.co.uk/CFIDE/scripts/ajax/package/cffileupload_swf.js 404 (Not Found) www.office5star.co.uk/:7
GET http://www.office5star.co.uk/CFIDE/scripts/ajax/ext/ext-all.js 404 (Not Found) www.office5star.co.uk/:7
GET http://www.office5star.co.uk/CFIDE/scripts/ajax/package/cfajax.js 404 (Not Found) www.office5star.co.uk/:7
GET http://www.office5star.co.uk/CFIDE/scripts/ajax/resources/cf/cf.css 404 (Not Found) www.office5star.co.uk/:7
GET http://www.office5star.co.uk/CFIDE/scripts/ajax/yui/animation/animation-min.js 404 (Not Found) www.office5star.co.uk/:7
Uncaught ReferenceError: ColdFusion is not defined www.office5star.co.uk/:22
Uncaught ReferenceError: ColdFusion is not defined 

而且,确实,/CFIDE 是不可访问的(好)。

但是,如果您想使用 ColdFusion 提供的 UI 小部件,您必须授予它访问其资源文件的权限。如果您已使 /CFIDE 不可访问,则需要使用它<cfajaximport>来利用其他位置的文件。

根据经验,如果 UI 上的某些内容不起作用:请检查浏览器控制台是否存在 HTTP 和 JS 错误。这是此类事情的常见原因。

于 2013-08-06T09:55:44.243 回答