首页  >  文章  >  后端开发  >  php-PHP怎么获取获取angularjs http.post

php-PHP怎么获取获取angularjs http.post

WBOY
WBOY原创
2016-06-02 11:28:23867浏览

http.postphppostangularjs

前端:$http({
method: 'POST',
url: "http://127.0.0.1:8080/school/studentadd.php",
data : newnames,
headers : {'Content-Type': 'application/x-www-form-urlencoded' }
}).success(function(){
console.log('success');
}).error(function(){
alert("error");
});
PHP接收:echo file_get_contents('php://input'); 没显示任何数据
php-PHP怎么获取获取angularjs http.post
这是什么原因,没获取到数据吗?

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn