Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/399.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 更新以从asp.net C运行php文件_C#_Javascript_Jquery_Asp.net - Fatal编程技术网

C# 更新以从asp.net C运行php文件

C# 更新以从asp.net C运行php文件,c#,javascript,jquery,asp.net,C#,Javascript,Jquery,Asp.net,在我的项目中,我想调用php文件。但它显示了一个错误405方法不允许。 请帮帮我 $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "/index.php", data: "{}", dataType: "json", success: function (data) { alert("success"); },

在我的项目中,我想调用php文件。但它显示了一个错误405方法不允许。 请帮帮我

 $.ajax({
    type: "POST",
    contentType: "application/json; charset=utf-8",
    url: "/index.php",
    data: "{}",
    dataType: "json",
    success: function (data) {
        alert("success");
    },
    error: function (result) {
        alert("Error");
    }
});

尝试“获取”方法而不是“发布”。

Thnak很多……。如果有帮助,请标记为“已回答”。