首页  >  问答  >  正文

javascript - js post引起的500错误???

服务器安装使用的是oneinstack一键安装包,lnmpa(Linux + Nginx+ MySQL+ PHP+ Apache)
程序是discuz3.2
在post submit时引起了500错误,
错误图片如下,感觉是forum_post.js引起的,但并没有修改这个js文件,也不知道为什么。。。然后,185行和165行相关js代码如下

function checkpostrule_post(theform) {
    if(!seccodecheck && !secqaacheck && !theform.sechash) {
        var x = new Ajax();
        x.get('forum.php?mod=ajax&action=checkpostrule&ac=' + postaction + '&inajax=yes', function(s) {
            if(s) {
                ajaxinnerhtml($('seccheck'), s);
                evalscript(s);
                seccodecheck = true;
            } else {
                postsubmit(theform);  ///////这行是165
            }
        });
    } else {
        postsubmit(theform);
    }
}

function postsubmit(theform) {
    if($(editorid + '_attachlist')) {
        $('postbox').appendChild($(editorid + '_attachlist'));
        $(editorid + '_attachlist').style.display = 'none';
    }
    if($(editorid + '_imgattachlist')) {
        $('postbox').appendChild($(editorid + '_imgattachlist'));
        $(editorid + '_imgattachlist').style.display = 'none';
    }
    hideMenu();

    theform.replysubmit ? theform.replysubmit.disabled = true : (theform.editsubmit ? theform.editsubmit.disabled = true : theform.topicsubmit.disabled = true);
    theform.submit(); /////这行是185
}
大家讲道理大家讲道理2683 天前602

全部回复(3)我来回复

  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-16 13:07:09

    500 是后端问题, 然后你说你是post 影响的 实质上


    nizhel

    你这里是get吧 看看 后端处理的有没有问题 get的参数是不是都正常

    回复
    0
  • 伊谢尔伦

    伊谢尔伦2017-05-16 13:07:09

    应该在打开控制台后查看Network->XHR中对应请求的Response
    看看真实返回内容是啥?

    回复
    0
  • ringa_lee

    ringa_lee2017-05-16 13:07:09

    500不是后端问题吗

    回复
    0
  • 取消回复