在Joomla 2.5中设置标头时,Ajax调用导致PHP脚本出错
在Joomla 2.5中,当ajax函数调用该脚本时,PHP脚本在下面的一行中止在Joomla 2.5中设置标头时,Ajax调用导致PHP脚本出错,php,ajax,joomla2.5,Php,Ajax,Joomla2.5,在Joomla 2.5中,当ajax函数调用该脚本时,PHP脚本在下面的一行中止 JResponse::setHeader( 'Content-Disposition', 'attachment; filename="example.json"' ); ajax调用如下所示 jQuery.ajax({ data: 'groupid='+group_id, type: 'post', url: "/index.php?option=com_example&view
JResponse::setHeader( 'Content-Disposition', 'attachment; filename="example.json"' );
ajax调用如下所示
jQuery.ajax({
data: 'groupid='+group_id,
type: 'post',
url: "/index.php?option=com_example&view=default&format=json",
success: function(data) {
if (0 == data)
addFormField(format_date);
else {
data_calculator = data;
jQuery(document).ready(function() {
initFields();
});
}
},
error: function(jqXHR, textStatus, errorThrown) {}
});
在Joomla 1.6中,它仍在工作。另外,当使用PHP函数头(…)设置头时,我也会遇到相同的错误。出了什么问题?您遇到了什么错误?您是否已打开“错误报告”=E\u ALL或将“显示错误”设置为“开”?相同的错误表示您遇到了什么错误?请提及that@cillosiserror\u reporting=E\u ALL已设置为on,display\u errors=on未更改任何内容。不幸的是,我没有得到任何答案。状态为:中止的Firebug结果。但我刚刚意识到这是一个帖子,而不是一个GET。