Php 使用jqueryfileupload的Ajax调用
在我的网站上加载jquery文件上载时出现以下错误:Php 使用jqueryfileupload的Ajax调用,php,jquery,file-upload,Php,Jquery,File Upload,在我的网站上加载jquery文件上载时出现以下错误: http://www.testsite.net/uploadfile/%5Bobject%20Object%5D?_=1354103435936 错误是页面响应 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </h
http://www.testsite.net/uploadfile/%5Bobject%20Object%5D?_=1354103435936
错误是页面响应
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
</body></html>
我通过在$document.ready中包含main.js修复了这个错误 因此main.js中的函数可以检测 $document.readyfunction{ $.getScript'js/main.js'; //确保main.js中的url是正确的 //如果仍然有错误,请设置计时器 // //setTimeoutfunction{ // //$.getScript'js/main.js'; // }, 1000; // //1秒后,main.js将包含在文件中
};错误在哪里?你能添加它吗?我已经更新了回复:-嘿,你找到解决方案了吗?谢谢
// Load existing files:
$.ajax({
// Uncomment the following to send cross-domain cookies:
//xhrFields: {withCredentials: true},
url: $('#fileupload').fileupload('option', 'url'),
dataType: 'json',
context: $('#fileupload')[0]
}).done(function (result) {
if (result && result.length) {
$(this).fileupload('option', 'done')
.call(this, null, {result: result});
}
});