dedeCMS中发送Ajax请求的时候出现out of memory
本人在dedeCMs中发送ajax请求的时候在火狐和谷歌浏览器下会发生out of memory错误,而ie就没有问题 为什么呢 求各位指教
$().ready(function(){
$('#submitbutton').click(function(){
var str=$('form[name=commentForm]').serialize();
$.ajax({
type:'post',
data:str,
url:'<?php echo $cfg_cmsurl;?>/plus/pinlun.php?act=addpinlun',
success:function(msg){
alert(msg);
}
});
});
$.ajax({
type:'get',
dataType:'json',
url:'<?php echo $cfg_cmsurl;?>/plus/pinlun.php?act=islogin',
success:function(msg){
if(msg.user_id>0){
var str=msg.username+'|<a href="<?php echo $cfg_cmsurl?>/member/index_do.php?fmdo=login&dopost=exit#">注销</a>';
$('#islogin').html(str);
}else{
$("input[name=title]").attr('disabled','disabled');
$("textarea[name=content]").attr('disabled','disabled');
$("#submitbutton").attr('disabled','disabled');
var str='<a href="<?php echo $cfg_cmsurl?>/member/login.php" target="_blank">登录</a> | <a href="<?php echo $cfg_cmsurl?>/member/index_do.php?fmdo=user&dopost=regnew" target="_blank">注册</a>';
$('#islogin').html(str);
}
}
});
});
</script>
下面的是php代码
<?php
header("content-type:text/html;charset=utf-8");
require_once(dirname(__FILE__)."/../include/common.inc.php");
$act=isset($_GET['act'])?$_GET['act']:'';
if($act=='addpinlun'){
$content=$_POST['content'];
$title=$_POST['title'];
$movie_id=$_POST['movie_id'];
$addtime=time();
require_once DEDEINC.'/memberlogin.class.php';
$mem=new MemberLogin();
$user_id=$mem->M_ID;
//echo $user_id;
if($user_id<0){
echo '请先登录!';exit;
}
$sql="insert into dede_pinglun(title,user_id,content,addtime,movie_id)values('$title','$user_id','$content','$addtime','$movie_id')";
$dsql->ExecuteNoneQuery($sql);
echo '你的评论已提交,正在审核';
}elseif($act=='islogin'){
require_once DEDEINC.'/memberlogin.class.php';
$mem=new MemberLogin();
$user_id=$mem->M_ID;
$username=$mem->M_LoginID;
echo json_encode(array('user_id'=>$user_id,'username'=>$username));
}
else{
$movie_id=$_GET['aid'];
require DEDEINC.'/arc.archives.class.php';
$arc=new Archives($movie_id);
$arc->ParAddTable();
include '../templets/a67/pinlun.htm';
}
?>