Home  >  Article  >  Backend Development  >  php-angularjs $http.post传值给本地PHP服务器,服务器应该怎么接收数据?

php-angularjs $http.post传值给本地PHP服务器,服务器应该怎么接收数据?

WBOY
WBOYOriginal
2016-06-02 11:28:23942browse

phpangularjs

比如:
$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服务器应该怎么接收这个数据?(我用的appserv)

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn