3
关注
1812
浏览

file_get_contents(“php:// input”)后ajax后空

查看全部 2 个回答

RichingMa 未验证用户 用户来自于: 广东省
2020-09-15 19:46

您需要设置的内容类型,以JSON和使JSON字符串化像

$http({ 
     url: 'PDO/Companion.php', 
     data: JSON.stringify({ 
      Companion : Companion, 
      Companion : statut 
     }), 
     method: 'POST', 
     headers : {'Content-Type':'application/json; charset=utf-8'} 


    }).then(function (response) {// on success 
     $scope.name=undefined; 
     $http.get('js/controller/upPartenaire.php').success(function(data) { 
      $scope.result = data; 
      console.log(data); 
     }), function(msg){ 
      console.log("ça") 
      alert(msg); 
     }; 

关于作者

问题动态

发布时间
2020-09-15 15:51
更新时间
2022-09-15 16:05
关注人数
3 人关注

相关问题

Php不工作添加更多行(中继器)
无法使用JSON和PHP将URL链接存储到MySQL中
个人工作笔记 Powered BY WeCenter V4.1.0 © 2024 粤ICP备2020123311号