How to get more information about error 500 - internal server error?

前端 未结 7 2228
粉色の甜心
粉色の甜心 2021-01-05 23:00

I use $ajax requests in many parts of my PHP website everything was working perfectly until few days ago all my $ajax requests start giving e

7条回答
  •  爱一瞬间的悲伤
    2021-01-05 23:16

    I don't know if this would help you, but i had the same issue a while ago, the only action i did was removing this from my jquery ajax functions

    dataType: "json"
    

    Here is some functions i made ("mostrar_alert_ui" is a modal alert windows function, same as "MostrarVentanaBoton" wich is a confirm alert function)

    //Función ajax con alert
    function Funciones_Ajax_conAlert(urlx, datax, callback, phpencode) {
        var TodoBien = false;
        $.ajax({
            type: "POST",
            url: urlx,
            data: datax,
            async: true,
            success: function (data) {
                if (phpencode == true) {
                    data = $.parseJSON(data);   
                }
                console.log(data) //Solo para propositos de debug
                if (data.success) {
                    MostrarVentanaBoton(data.titulo, data.mensaje, data.boton, callback);
                } else {
                    mostrar_alert_ui(data.titulo, data.mensaje)
                }
            },
            error: function (xhr, ajaxOptions, thrownError) {
                alert("Failed " + urlx);
                alert(xhr.responseText);
                alert(thrownError);
            }
        });
    }
    

    And just in case, double check the directions

提交回复
热议问题