在ajax中设置绝对路径不起作用

时间:2015-09-04 18:16:56

标签: javascript php jquery ajax

我正在尝试设置url的绝对路径,以便从domain.com/functions/contact.php加载,但是当我这样做时,我收到500服务器状态错误

$.ajax({
        url: "/functions/contact.php",
        type: "post",
        data: {stage : optionScope.data().stage,
              topics: optionScope.data().topic,
              mentor: optionScope.data().mentor,
              fname: $('#fname').val(),
              email: $('#email').val(),
              humancheck: $('#humancheck').val()
            },
        success: function (response) {
            console.log("data sent successfully");
            window.location = response;

        },
        error: function (xhr, desc, err) {
            console.log(xhr);
            console.log("Details: " + desc + "\nError:" + err);
        }
    });

0 个答案:

没有答案