搜尋

首頁  >  問答  >  主體

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
}
大家讲道理大家讲道理2827 天前692

全部回覆(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
  • 取消回覆