Apache Server,PHP解释器,PostgreSQL如何协同工作,当一起使用时,它们的作用是什么


How does Apache Server, PHP interpreter, PostgreSQL work together what are their role when used together

我正在做一个关于 android 应用程序开发的项目,我需要知道 hpw 是否 3 这一起工作 当用尽可能简单的语言工作时,他们的任务是什么,我希望用文字表达它,这样即使是外行也很容易抓住它!

就这么简单

HTTP-client (browser) <--> HTTP server (apache) <--> PHP interpreter <--> Postgres
  • 客户端发送请求
  • Apache将其重新发送到PHP
  • PHP 查询 PG,获取数据,将其呈现为 HTML(或 JSON)并将其返回给 Apache
  • 而 Apache 将响应发送到客户端
  • 客户端呈现外观漂亮的页面