简体   繁体   中英

Who really communicate with MySQL, Apache or PHP?

当我调用一个函数从 MySQL 接收表数据传输发生在 PHP 和 MySQL 之间,还是在 Apache 和 MySQL 之间,然后 Apache 将这张表交给 PHP?

The simplest way to visalize the workflow :

  1. Apache gets a request and sends request data to php thread
  2. PHP engine stores request data in $_POST, $_GET, $_SERVER variables
  3. PHP executes your script. Your script connects to external services like MySQL and retrieves data
  4. PHP outputs data to apache
  5. Apache sends back data to your browser

Apache is only a webserver, it handles only a receiving/delivering the content generated by browser (sending HTTP requests) and php (outputing content for that requests)

Apache 只是一个 web 服务器,只提供页面......通信是在 php 和您的数据库引擎之间使用 php mysql 驱动程序

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM