Breaking News
Home / Web / PHP / PHP Snippets / How does the Request and Response Sequence for PHP file look like?

How does the Request and Response Sequence for PHP file look like?

 The following steps describe the request-response sequence for a PHP file:

  1. The Web browser requests a document with a .php extension.

  2. The Web server sends the request on to the PHP parser, which is either built into the Web server binary or exists separately as a filter or CGI executable.

  3. The PHP parser scans the requested file for PHP code.

  4. When the PHP parser finds PHP code, it executes that code and places the resulting output (if any) into the place in the file formerly occupied by the code.

  5. This new output file is sent back to the Web server.

  6. The Web server sends the output file along to the Web browser.

  7. The Web browser displays the output.
<!>

[pb_builder]

Check Also

How to list files in a directory in PHP?

<?php if ($handle = opendir(‘/path/to/directory’)) {     echo "Directory handle: $handlen";     echo …

Advertisment ad adsense adlogger