PHP头条
热点:

为何PHP不能接收。


为什么PHP不能接收。。
 $.ajax({
       type: "POST",
        url: "index.php",
        data: "location=img_png_src",
        success: function(msg){
         alert( "Data Saved: " + msg );
           }
      });



PHP接受不了 报错了 Notice: Undefined index: location in C:\wamp\www\makebanner\index.php on line 45
------解决方案--------------------

if($_SERVER['REQUEST_METHOD'] == "POST") {
  print_r($_POST);
  exit();
}
?>
《script》
《script》
$(function() {
 $.ajax({
       type: "POST",
//        url: "index.php",
        data: "location=img_png_src",
        success: function(msg){
         alert( "Data Saved: " + msg );
           }
      });
});
《script》

www.phpzy.comtrue/phprm/3754.htmlTechArticle为何PHP不能接收。 为什么PHP不能接收。。 $.ajax({ type:"POST", url:"index.php", data:"location=img_png_src", success:function(msg){ alert("DataSaved:"+msg); } }); PHP接受不了报错了Notice:Undefinedindex:locationinC:\wam...

相关文章

相关频道:

PHP之友评论

今天推荐