javascript - 怎样用node和php实现前后端分离,有具体的例子吗
大家讲道理
大家讲道理 2017-05-16 13:02:40
0
1
283

node作为中间层,接受浏览器的请求,再去请求php api接口 拼接html,返回给浏览器

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(1)
Ty80

I think it’s not that complicated, it’s actually just two layers

  • In the first layer, the browser sends a request to the node

  • The second layer node sends the request to php

Just completely isolate these two and look at it. As for the interface for node to call php, it should be CURL.
I haven’t used many nodes, so I don’t know much about it. Sorry

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!