我遇到以下ajax请求时遇到这个奇怪的问题。
$.ajax({
type:'POST',
url:'import_data.php',
data:'buildquery',
dataType:'xml',
success:function(response){
console.log(response);
},
complete:function(response){
console.log(response);
},
error:function(jqXHR,textStatus,errorThrown){
alert('error');
console.log(textStatus, errorThrown);
}
});
在import_data.php中我有一些成功执行的数据库操作(大约需要30分钟),然后打印出以下xml文件
<metaclass>
<status>ok</status>
</metaclass>
但问题是即使在完成我的php执行后,我也没有得到任何响应。请求仍未完成,在firebug请求仍在进行中......
如果脚本执行时间较短,我的回复工作正常,我的意思是如果import_data.php只花了2或3分钟,那么我得到的回复......
非常感谢任何信息,提前致谢。