php – Jquery文件上传SyntaxError:JSON.parse:JSON数据后出现意外的非空白字符
|
我想使用产品但是当上传图片时我看到错误 SyntaxError:JSON.parse:JSON数据之后的意外非空白字符 script directory: Folder2
directory Jquery-file-upload: function/blueimp-jQuery-File-Upload/
in main.js i edit rows
$('#fileupload').fileupload({
// Uncomment the following to send cross-domain cookies:
//xhrFields: {withCredentials: true},url: 'server/php/'
});
上 $('#fileupload').fileupload({
// Uncomment the following to send cross-domain cookies:
//xhrFields: {withCredentials: true},url: '../function/blueimp-jQuery-File-Upload/server/php/'
});
图像true保存在服务器上,但在上传后显示错误. 步骤1 Step2有错误 furebug对请求的回应 [{"name":"1353755388.jpg","size":879394,"type":"image/jpeg","url":"http://malish-ka.ru/function/blueimp-jQuery-File-Upload/server/php/files/1353755388.jpg","thumbnail_url":"http://malish-ka.ru/function/blueimp-jQuery-File-Upload/server/php/files/thumbnail/1353755388.jpg","upload_to_db":true,"delete_url":"http://malish-ka.ru/function/blueimp-jQuery-File-Upload/server/php/?file=ExPRoG-1353755388.jpg","delete_type":"DELETE"}]/home/m/malishkaru/public_html/function/blueimp-jQuery-File-Upload/server/php
告诉我,为什么我有这个错误?出错时? 由于结束后的文本,您显示的“对请求的响应”不是有效的JSON.如果您可以将PHP更改为在结束后不返回所有内容,那么您将拥有有效的JSON. “意外的非空白字符”是关闭后的/ in / home / m / etc] 我在写/ home / m / malishkaru / public_html / function / blueimp -jQuery-File-Upload / server / php时删除了部分代码. P.S.:感谢nnnnnn. P.P.S:仅回答密切问题.用户nnnnnn给出了很好的答案. (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
