谁真正与MySQL,Apache或PHP沟通?

When I call a function to receive table from MySQL data transmission occurs between PHP and MySQL, or between Apache and MySQL and then Apache gives to PHP this table?

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 is just a web server and just serve pages ... The communications is between php and your database engine with the php mysql driver