[英]Is it possible to use Angular to communicate with PHP?
Can I use MySQL, PHP and Apache to communicate with my front end which is built with JavaScript (Angular)? 我可以使用MySQL,PHP和Apache与使用JavaScript(Angular)构建的前端进行通信吗?
Is this a problem since PHP and JavaScript are both web programming languages? 因为PHP和JavaScript都是Web编程语言,所以这是一个问题吗?
Thanks in advance, I'm sort of new to all of this. 在此先感谢,我是所有这些的新手。
You should use Angular $http
service to make calls to your php backend. 您应该使用Angular
$http
服务来调用您的php后端。
Make sure you send json from php to angular. 确保从php发送json到angular。 (use
json_encode()
) (使用
json_encode()
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.