Php Jquery文件上载语法错误:JSON.parse:JSON数据后出现意外的非空白字符

Php Jquery文件上载语法错误:JSON.parse:JSON数据后出现意外的非空白字符,php,jquery,file-upload,Php,Jquery,File Upload,我想使用prduct,但上传图像时我看到错误 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 cros

我想使用prduct,但上传图像时我看到错误

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/'
});

图像在服务器上保存为真,但上传后显示错误

步骤1

步骤2出现错误

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时删除了部分代码,所有代码都正常工作了

附言:谢谢


附言:只回答封闭式问题。用户nnnnnn给出正确答案。

您显示的“对请求的响应”不是有效的JSON,因为关闭后的文本
]
。如果您可以将PHP更改为在关闭
]
后不返回所有内容,那么您将拥有有效的JSON。“意外的非空白字符”是
/home/m/etc
中在关闭
]
后出现的
/
。请问您删除了什么部分?
[{"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