Home > Backend Development > PHP Tutorial > angularjs - php如何获取angular中用$http提交的post请求的内容

angularjs - php如何获取angular中用$http提交的post请求的内容

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:26:13
Original
1107 people have browsed it

开发中想用angular中的http服务,数据提交没有问题,可是后台php如何得到前台的内容,并存入数据库中,还有就是如何把从数据库提取出的数据用ng-repeat显示到页面

回复内容:

开发中想用angular中的http服务,数据提交没有问题,可是后台php如何得到前台的内容,并存入数据库中,还有就是如何把从数据库提取出的数据用ng-repeat显示到页面

angularjs的http默认格式不是标准的post数据,要接受到的话使用php://input 或者在$http发起请求的时候 把提交的数据格式化成标准的post格式数据 a=1&b=2 这样

Related labels:
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template