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

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

WBOY
Release: 2016-06-02 11:28:23
Original
977 people have browsed it

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)

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template