Web Execution Order

What is the execution order on the Internet? PHP, HTML, Javascript, css and mysql are elements to execute.

+3
source share
7 answers

The order is as follows:

  • Browser - send request
  • Server - execute PHP script
  • Server - sending output to the browser
  • Browser - Read and Execute JavaScript

Here is an example:

  • Browser: requesting page /index.php
  • Server: execute index.php file on server

    <?php echo "Hello, world!;"; ?> <script>alert("hello!")</script>

  • Server: answer the output

  • Browser: analyze output
  • Browser: <script>detectedalert("hello!")

http-proces.png

+6
source

The order of execution (when you first visit the page):

First server, then client.

- , .

PHP , . PHP mysql , ? PHP script (s) mysql . , PHP , (HTML, Javascript, css) /.

+2

, -. Apache DirectoryIndex. , index.html, index.cgi, index.php .., , :


DirectoryIndex index.cgi index.php index.shtml index.html

ISS , , .

HTML CSS ( ). Javascript , .

Mysql , , php cgi script.

+1

, .

0

→ - (, apache) → php → php builds html mysql → html , css → javascript

0

, JSConf: http://jsconfeu.blip.tv/file/3060565/

.

, PHP , MySQL.

0

, ( , , , , , , )

0

Source: https://habr.com/ru/post/1774230/


All Articles